dimanche 19 janvier 2020

How do I add isolated partial authenticator:oauth2 functionality to an Ember app

I'm using AuthenticatedRouteMixin and ApplicationRouteMixin from ember-simple-auth with ember-simple-auth-token to provide a TokenAuthorizerMixin with authenticator:jwt for my app. They both use a service called session to provide functionality.

Now I need to implement access to a foreign endpoint which uses oAuth. My app receives an oAuth bearer access_token, refresh_token and expires_in with the jwt that can be used for this route.

How can I automate the refreshing of this token client-side without touching the application-wide session service in use by authenticator:jwt?

How can I send authenticator:oauth2 headers in stead of authenticator:jwt headers on one (or a few) routes only, when aforementioned mixins use the same session service internally?




Aucun commentaire:

Enregistrer un commentaire