jeudi 4 août 2016

torii gets authorization code instead access token

I have an ember app that connects with github, but the authentication flow returns the authorization code, not the access token, and I don't really know how to do the exchange...well, at least I didn't found any examples on the internet.

I'm kinda new to ember, this is what I got so far

authenticator/torii.js

import Ember from 'ember';
import ToriiAuthenticator from 'ember-simple-auth/authenticators/torii';

export default ToriiAuthenticator.extend({
  torii: Ember.inject.service()
});

torii-providers/github.js

import GithubOauth2Provider from 'torii/providers/github-oauth2';

export default GithubOauth2Provider.extend({
  fetch(data) {
    return data;
  }
});

I know I may have to change something in the provider, but I don't really know where to start




Aucun commentaire:

Enregistrer un commentaire