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

[Revision] Suggestion to revise the blog #1

Open
jaballogian opened this issue Aug 3, 2021 · 0 comments
Open

[Revision] Suggestion to revise the blog #1

jaballogian opened this issue Aug 3, 2021 · 0 comments

Comments

@jaballogian
Copy link

jaballogian commented Aug 3, 2021

I found this repository from this blog https://scalac.io/blog/user-authentication-keycloak-1/.

I tried to use keycloack in my react app using that blog and this repo.
Then I found an error (clientId was not found) in the app. I tried to search another keycloak in react example and I found this repo https://github.com/react-keycloak/react-keycloak-examples/blob/master/examples/react-navi/src/App.js. I realize that the keycloack settings from both the app are different.

I replaced the keycloak setting (this repo) from this:

const keycloak = Keycloak({
    "realm": "MyDemo",
    "auth-server-url": "http://localhost:8080/auth/",
    "ssl-required": "external",
    "resource": "my-react-client",
    "public-client": true,
    "confidential-port": 0,
});

into this:

const keycloak = Keycloak({
    realm: 'MyDemo',
    url: "http://localhost:8080/auth/",
    clientId: 'my-react-client',
});

and it fixed the react app.

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