mardi 16 juin 2020

Ember promise aware headers in Adapter

Looking for a way to set header in Ember Adapter layer with the value returned from an async call.

Trying to set the idToken returend from Amplify's Auth.currentSession(), which is a promise function which internally handles refreshing the token on expiration.

.

.

I see that we can't make a promise aware computed property too for headers.

Also I am not looking for a solution using ember-simple-auth / ember-cognito or any other addons, I need to achieve this just with plain amplify library and Ember adapters header 😟.




Aucun commentaire:

Enregistrer un commentaire