Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

How to capture JWT in the query string?

$
0
0

@ridermansb wrote:

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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles