Hello,
These three functions of the signin widget feel so similar I don’t understand the difference.
I have a single HTML/JavaScript page, served by a node webserver. I want visitors to hit the page with the following or similar logic flow.
“If not signed in, render the widget, else render the HTML.”
I seem to have what I am hoping for already working using sample code from the documentation, however I don’t feel confident I am using the right approach given the three possibilities below. I have seen sample code using both the renderEL and token.hasTokensInUrl and am not sure which route to take and why.
renderEl
Renders the widget to the DOM, and passes control back to your app through success and error callback functions when the user has entered a success or error state.
showSignInToGetTokens
Renders the widget to the DOM to prompt the user to sign in. On successful authentication, users are redirected back to the application via the redirectUri
with an Okta SSO session in the browser, and access and/or identity tokens in the fragment identifier.
token.hasTokensInUrl
Synchronous method to check for access or ID Tokens in the url. This is used when authParams.display = 'page'
. Returns true
if there are tokens, and false
if the redirect flow has not taken place yet.
All 3 of these feel so similar…