okta-react-native icon indicating copy to clipboard operation
okta-react-native copied to clipboard

Support additional parameters to the /authorize endpoint

Open sjmorton123 opened this issue 4 years ago • 5 comments

I'm submitting a:

  • [ ] Bug report
  • [ x] Feature request
  • [ ] Other (Describe below)

Current behavior

I am currently needing to add an additional optional request parameter to the /authorize endpoint. Specifically I would like to be able to pass the "prompt" parameter to the endpoint as outlined in this link.

https://developer.okta.com/docs/reference/api/oidc/#authorize

image

Looking in the source code it looks like the required values are passed into createConfig but I can't any of the extra optional including the "prompt" parameter.

Expected behavior

Would you be able to add an authorizeOptions parameter either in the createConfig call or in the singInWithBrowser call that supports any of these additional request parameters?

Extra information about the use case/user story you are trying to implement

We are a client with Okta and have Okta setup and connected to Azure AD. What we are seeing right now is when I reset my password in Azure AD on the web while we are currently logged into our devices we are still able to make authenticated calls through Okta for about a day or so. We were advised by our Okta consultant that this would be addressed if we could pass the "prompt" request param with a value of "login" to the /authorize endpoint.

Environment

  • Package Version: 2.2.0
  • React Native Version: 0.64.2
  • OS: MacOS Monterey 12.0.1 (M1 Macbook Pro)
  • Node version (node -v): 16.13.0

Please let me know if I provided enough information!

sjmorton123 avatar Dec 07 '21 04:12 sjmorton123

Hi @sjmorton123 Good input!

The issue does make sense. I created two internal issue OKTA-452262 (iOS) and OKTA-452267 (Android).

oleggnidets-okta avatar Dec 07 '21 09:12 oleggnidets-okta

@sjmorton123 I've just figured out that additional parameters can be passed in signInWithBrowser method. But it works only on iOS (for now being, we're in progress).

signInWithBrowser({ prompt: 'login' }) signInWithBrowser({ login_hint: '[email protected]', prompt: 'login' })

oleggnidets-okta avatar Dec 08 '21 14:12 oleggnidets-okta

Oh that is great! I tried reading through the swift code but must have missed that ability. Thank you for the update!

sjmorton123 avatar Dec 09 '21 16:12 sjmorton123

Hi there. Do you have any updates on that change for Android? No rush just wanted to check in!

sjmorton123 avatar Dec 20 '21 18:12 sjmorton123

@sjmorton123 Changes will be released in the next update.

NikitaAvraimov-okta avatar Feb 04 '22 14:02 NikitaAvraimov-okta