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

onBeforeSignIn not invoked when calling signIn #705

Open
pseudoramble opened this issue Aug 24, 2021 · 4 comments
Open

onBeforeSignIn not invoked when calling signIn #705

pseudoramble opened this issue Aug 24, 2021 · 4 comments

Comments

@pseudoramble
Copy link
Contributor

I noticed that when signIn is called directly, as opposed to say autoSignIn the onBeforeSignIn hook is not called. I think it's inconsistent to do it this way since it seems like the kind of thing that should be always called regardless of when or how sign in is occurring.

Looking back at old issues though, I did notice #36 and #447 which seem to point to using oidc-client and the back end to handle this kind of work. I wasn't aware of this as an option until I came across this issue.

So two ideas I had for this:

  1. Call onBeforeSignIn whenever the signIn function is called.
  2. Consider deprecating onBeforeSignIn for future releases and encourage people to use these other options.

I'm partial to the first option because it's less work for me 😆 but I figured I'd at least write this down as a potential issue.

@MaelthiS
Copy link

+1

@simenandre
Copy link
Member

I agree, we should look for a more consistent way.

I try to think that oidc-react should have more focus on developer experience than most features/expandability. I have to think about what option to go forward with, not too sure 🤷‍♂️

@MaelthiS
Copy link

@cobraz any news on this ?

@jamesdh
Copy link
Contributor

jamesdh commented Mar 2, 2023

This is still an issue, and I should be able to resolve it as part of some additional cleanup.

@jamesdh jamesdh reopened this Mar 2, 2023
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

4 participants