Last active
November 17, 2017 15:43
-
-
Save alvincrespo/6075ee07daef2e507d58f4c8dbf17559 to your computer and use it in GitHub Desktop.
Configured oauth authenticator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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