I use BaaS (Stamplay) and to authenticate with e-mail/password or with Twitter (or any other)
For authentication via email and password, I created a custom auth. And it’s working.
this.get('session').authenticate('authenticator:stamplay', credentials)
.catch((message) => {
this.set('errorMessage', message);
})
.finally(() => {
this.set('isSubmiting', false);
});
But for authentication via twitter… the callback is MyApp.com/index.html?jwt=eyJXXXXXX
so a error is reported in console
ember.debug.js:4903 Uncaught UnrecognizedURLError: /index.html?jwt=eyJXXXXXX
So, my question is, how can I when callback to my app… the auth get the jwt and set the into localstorage like e-mail/password?