Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiler error in main.go:49 #10

Open
Vertexwahn opened this issue Jul 20, 2017 · 2 comments
Open

Compiler error in main.go:49 #10

Vertexwahn opened this issue Jul 20, 2017 · 2 comments

Comments

@Vertexwahn
Copy link

Vertexwahn commented Jul 20, 2017

If I try to compile the demo, I get the following error:

PS C:\dev\auth0-golang-jwt-master> go run main.go
# command-line-arguments
.\main.go:49: cannot use audience (type string) as type []string in argument to auth0.NewConfiguration
PS C:\dev\auth0-golang-jwt-master>

The line
configuration := auth0.NewConfiguration(secretProvider, audience, "https://{YOUR-AUTH0-DOMAIN}.auth0.com/", jose.HS256)

needs to be changed in this way:

configuration := auth0.NewConfiguration(secretProvider, []string{audience}, "https://{YOUR-AUTH0-DOMAIN}.auth0.com/", jose.HS256)

@paulzmuda
Copy link

The above solution worked for me. I was compiling on localhost Windows 7 machine, noticed OP had a Windows directory in his error - maybe relevant.

@brainstorminglllp
Copy link

FOR ME TOO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants