oidc-client icon indicating copy to clipboard operation
oidc-client copied to clipboard

How to trigger sign up rather than login

Open john-davis-fundthatflip opened this issue 3 years ago • 4 comments

Issue and Steps to Reproduce

Not really an issue

First off. Thank you for the library! Second, we have a sign up flow that eventually redirects to a hosted ui thanks to the library, but it takes them to the /login hosted ui. I was wondering if there is a way to take them to /signup hosted ui. useOidc hook has login and logout, maybe if possible a signup method could be added? Or if there is a workaround on my end that you know of works too. From reading your code, it seems like you are calling @openid/appauth which handles that with AuthorizationRequest from the loginAsync method. Do you know if we can pass any param to trigger sign up page vs login? Any help is appreciated. I figured I would ask here to see if this has been addressed before. Thank you again.

Versions

6.4.0

Screenshots

Expected

Actual

Additional Details

  • Installed packages:

john-davis-fundthatflip avatar Sep 14 '22 13:09 john-davis-fundthatflip

Hi @john-davis-fundthatflip , thank you very much for your issue. I have found that specification : https://openid.net/specs/openid-connect-prompt-create-1_0.html

I am not sure, but may be it can work if you use in thelogin function the extras parameter.

{'prompt':"create"}

I have to study how to do that on a clean way

guillaume-chervet avatar Sep 14 '22 15:09 guillaume-chervet

Thank you! I will play around with this to see if it will work.

john-davis-fundthatflip avatar Sep 15 '22 19:09 john-davis-fundthatflip

This does depend on whether or not your OIDC backend solution supports this prompt, but if it follows the OIDC specification then it should

Thodor12 avatar Sep 16 '22 14:09 Thodor12

Hi @john-davis-fundthatflip , does it work?

guillaume-chervet avatar Oct 17 '22 06:10 guillaume-chervet