Hi @m.placzkow, and welcome to the Auth0 Community!
For your use case, my suggestion is to set the callback URL to a route within your Angular application. The flow would be something like:
- User navigates to your Angular application (initially loaded via the .NET MVC page).
- Angular detects that the user is not authenticated.
- Angular redirects the user to your .NET MVC application (or a specific endpoint on it).
- The .NET MVC application initiates the Auth0 authentication flow, redirecting the user to the Auth0 login page.
- User authenticates on the Auth0 page.
- Auth0 redirects the user back to your Angular application’s callback route
- The library stores the tokens in the browser’s storage.
- Your Angular application is now authenticated.
As for refreshing tokens, you can use Silent Authentication. Please see our docs for more information on how to set them up.
Please let me know if you need any additional information!
Sincerely,
Teodor.