I have normal auth and a social provider working. Now I want to implement account linking.
I’m using Blazor Server.
The issue I’m having is that I don’t see a way to override the /callback on a per request basis like the example shows here in javascript. auth0-link-accounts-sample/RegularWebApp/lib/routes/link.js at f13f33940628c9538f37c624ec6a7ccd1370fb2f · auth0-samples/auth0-link-accounts-sample · GitHub
I see that I can set the CallbackPath in the options, but that is global.
My goal is:
- User logs in with normal auth0 auth.
- User goes to profile page.
- User clicks “Link to social site” button
- User logs into social site
- User is redirected back to the profile page showing the connection.
What is happening is on #4, that authentication overrides the original authentication.
My thought is that for social login only, I need to override the /callback handler.
Is that possible or should I override the default /callback handler and detect:
- If normal login then carry on with base implementation
- If social login, then override and don’t see the auth cookie.
Thoughts?