This is a sample ember-simple-auth authenticator implementation for the oauth2 Implicit Grant which implements "silent reauthentication" (fetching a new token from the IDP via the prompt=none
flow). It also uses ember-master-tab to run the refresh process in only a single tab (if the application is open in multiple tabs); at time of writing, it's necessary to use the master
branch rather than the version published to npm
as it makes use of a recent change to try to recover from the master tab crashing (as opposed to being closed cleanly).
This implementation also expects the token to be a JWT; you may need to adjust the token-related parts if you're not using JWTs.
This gist is not a fully developed, drop-in, ready-to-use implementation. It's intended as a starting point for your own implementation, so you'll need to do some work yourself to use it -