Automatic sign-in
See original GitHub issueThe base example in the README displays a log in button when you launch the app.
This is not how most apps work, and it probably should be updated to something more common.
Most apps will silently and automatically reestablish your previous session, if you close the tab and reopen the app.
I have not been able to achieve that react-oidc-context
- I only seem to get myself into infinite circular logins.
I’m coming from oidc-react
, which would automatically take care of this. (but which I have other problems with - namely, silent renewals do not seem to work correctly, which you seem to have given more consideration to.)
With this library, it looks like I have to manually call a function like signinSilent
or signinRedirect
to make it work?
EDIT: it turns out signinRedirect
might either redirect or just silently resume a prior session, if possible - just the function name is a little misleading here.
I’m really missing a better example here, please.
I’m sure others have gotten this to work? It seems the package is very popular, and I doubt everyone is using the example from the README, making their users manually sign in every time they visit the page? 🙂
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
Here’s the custom hook I use which covers corner cases I’ve tried
@pamapa Would be happy to let me know if there’s any problem with this implementation.
Oh, it’s a top level export. 😊
Yes, with your suggested change, logout and redirection now works as well!
Thanks!
It’s an open source project - I will post a link to the full working example for future reference.