I have an angular 6 application. I’m trying to get an access token from an oauth2 provider. I successfully get the token but I’m not able to load my callback page. The problem seems to be that the token is attached to the callback url with a # and my angular router doesn’t like #.
Here is an example of the callback url with the token:
http://localhost:4200/oauth2-callback/#access_token=***&token_type=Bearer&expires_in=31622400
Here is my route configuration:
{
path: 'oauth2-callback/:token',
component: Oauth2CallbackComponent,
canActivate: [AuthGuard]
}
I tested this out by manually going to http://localhost:4200/oauth2-callback/xyz. <— This works fine. But then I try with: http://localgost:4200/oauth2-callback/#xyz. <— This redirects me to our error page.
So my question is: how can I configure my routing to handle parameters beginning with #?
Thanks.