-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need the hashbang to work pushState = false #30
Comments
I think that we can't use # simbols on the redirect urls because the identity server is using fragements to send tokens states etc. something ${callbackUrl}#token=(...) and so token will mess with routing match. I solved this be using a callback.html page that redirects back to '/' after. Not sure if is a good soluction but seems like the aurelia-router is not able to detect redicted to routes because fragments are used to send values in the redirect url. Maybe instead of register redirect_uri as a aurelia router, it should be handled by a different mechanism just for these urls |
Please can you share your callback.html? What do I have to do in callback.html besides the redirect? |
is a regular html. with a body like this
<body>
<script src="oidc-client.js"></script>
<script>
new Oidc.UserManager().signinRedirectCallback().then(function () {
window.location = "/";
}).catch(function (e) {
console.error(e);
});
</script>
</body>
was doing the job a few version ago, not sure about now.
… |
Thanks! It works! |
You can also handle authentication yourself in aurelia's configure method (by default located in main.ts). in one of my projects:
|
I'll see if we can get this baked in, or at least documented |
About 6 months ago I created a proto of Identity Server 3 with AspNet Identity and an Aurelia app. Also with the suggested pushState = true for the Aurelia router. At the time was told to shelve the proto but, was working great. Fast-forward to 6+ months of Aurelia development and now dusting off the proto for OIDC. We now have many items using the hashbang, google tag manager and a WordPress homepage to name a few. So, everything works until I set pushState = true. I've tried many different configs with the redirect urls without any luck. I do not know how to create a hack to make this work or even where to start.
Any ideas would be very helpful.
The text was updated successfully, but these errors were encountered: