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

Server does not pass auth0 data to React #18

Open
leoromanovsky opened this issue Jan 29, 2020 · 0 comments
Open

Server does not pass auth0 data to React #18

leoromanovsky opened this issue Jan 29, 2020 · 0 comments

Comments

@leoromanovsky
Copy link

window.AUTH0_DOMAIN = {{.AUTH0_DOMAIN}};
window.AUTH0_CLIENT_ID = {{.AUTH0_CLIENT_ID}};
window.AUTH0_AUDIENCE = {{.AUTH0_AUDIENCE}};
window.AUTH0_CALLBACK = {{.AUTH0_CALLBACK}};

Since this is a static HTML file, not a gin tmpl the executed javascript code is:

      window.AUTH0_DOMAIN = {{ .AUTH0_DOMAIN }};
      window.AUTH0_CLIENT_ID = {{ .AUTH0_CLIENT_ID }};
      window.AUTH0_AUDIENCE = {{ .AUTH0_AUDIENCE }};
      window.AUTH0_CALLBACK = {{ .AUTH0_CALLBACK }};

Have you been able to figure out how to pass data from gin to React?

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

1 participant