Angular - loginWithRedirection documentation on options?

Hi all,

I’ve spent a couple of hours trying to figure out how the RedirectLoginOptions interface is defined and what exactly I can put into the options for an auth.loginWithRedirect() call. I have come across another forum post which allows me to do this.auth.loginWithRedirect({appState: { target: '/dashboard'}}) , which is great for jumping back to a dashboard in my application - but I’d also like a way to trigger this with a way to automatically show the create account screen.

I’ve gone through the github project itself and find variations of AppState, TAppState, RedirectLoginOptions, SPARedirectLoginOptions, and so on with nothing actually defined within the project. I’m uncertain if these options are obfuscated or if I don’t know how to use github right to find what I need.

Any help is appreciated, thanks!

Hello, @saeltorres

It sounds like you’ve been deep into the weeds with this! The RedirectLoginOptions interface can indeed be a bit tricky to pin down. Here’s a bit of clarity:

RedirectLoginOptions Interface
The RedirectLoginOptions interface is used to control the redirect behavior when calling auth.loginWithRedirect().

this.auth.loginWithRedirect({
appState: { target: ‘/dashboard’ },
authorizationParams: { screen_hint: ‘signup’ }
});
This should direct users to the signup page instead of the login page.

Variations and Definitions
The variations like AppState, TAppState, SPARedirectLoginOptions, etc., are often used to handle different aspects of the state and options within the Auth0 SDK. They might not always be explicitly defined in a single place but are used contextually within the SDK.

If you need more detailed examples or run into specific issues, the Auth0 Community and their documentation are great resources.

Feel free to ask if you have more questions or need further assistance!
Best regards
Marcus dexon