Skip to content

Instantly share code, notes, and snippets.

@alvincrespo
Last active November 17, 2017 15:43
Show Gist options
  • Save alvincrespo/6075ee07daef2e507d58f4c8dbf17559 to your computer and use it in GitHub Desktop.
Save alvincrespo/6075ee07daef2e507d58f4c8dbf17559 to your computer and use it in GitHub Desktop.
Configured oauth authenticator
// auth-example-frontend/app/authenticators/oauth2.js
import OAuth2PasswordGrant from 'ember-simple-auth/authenticators/oauth2-password-grant';
import config from 'my-app/config/environment';
const host = config.apiUrl || '';
const namespace = config.apiNamespace;
const serverTokenEndpoint = [ host, namespace, 'token' ];
export default OAuth2PasswordGrant.extend({
serverTokenEndpoint: serverTokenEndpoint.join('/')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment