I’m using an embedded okta sign-in widget for users to register in my signup page as follows:
const signIn = new OktaSignIn({
baseUrl: `https://dev-xxx.okta.com`,
clientId: 'xxx',
redirectUri: window.location.origin,
features: {
registration: true,
}
})
signIn.showSignInToGetTokens({
el: '#signup'
}).then((res: any) => {
console.log(res)
}).catch((err: any) => {
console.log(err);
});
signIn.on('ready', () => {
// we want to show the widget signup instead of signin, this is a hack
document.getElementsByClassName('registration-link')[0]?.click();
})
However after successful registration, the authState from useOktaAuth hook is unchanged. Am I missing a step? Do I need to sign in users after they register?
It seems you are also using okta-react, given the useOktaAuth. If so, can you also provide your code around your Security wrapper, or provide the code where you are retrieving the authState.