-
Notifications
You must be signed in to change notification settings - Fork 114
Consider switching sample repo to 'Authorization Code with PKCE' flow #24
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
Comments
There's now a branch for this support following option 3. I'm running into some issues with silent refreshes via iframe though, and will open an issue about that in the library repository. |
I've updated the branch so that it:
I'm not yet ready to merge it to become the main example, as I think silent refresh via iframes is a must have for applications, to offer a nice UX. |
This issue is blocked by #34 |
🎉 🎉 🎉 It is now finally working!
<!-- silent-refresh.html for Code Flow -->
<script>
console.log("The silent-refresh.html file was loaded and now posting to the parent.");
const fakeHashFragment = location.search.replace(/^\?/, "#");
parent.postMessage(fakeHashFragment, location.origin);
</script>
Wow, I now see that the Silent Refresh documentation was rewritten lately, promoting what I considered a workaround as a proper solution (with some added tweaks too). I'm not sure if I like the approach, but it seems the way forward, so will just roll with it... |
The relevant working groups have updated the advice for single page applications (such as this one, which uses Angular) around the recommended flow. Latest recommendation seems to be that SPA's should switch from "Implicit Flow" to the "Authorization Code with PKCE" flow.
After several different feature requests it was recently released in version 8.
I'm not sure how exactly yet, but I would like my sample repository to somehow support showcasing Code+PKCE flow. However, many people will still want to be using Implicit flow, and it seems awkward to support both.
Some ideas how this repo could support both:
master
and provide a way to toggle between the two.master
, and refer to an older commit if folks want to see Implicit Flow in action.master
at Implicit (perhaps with a readme update pointing to the branch). Then later switch them around (effectively going back to option 2).I think option 3 will have to do for the moment, as we'll need a place to start anyways.
The text was updated successfully, but these errors were encountered: