Last active
October 21, 2017 15:14
-
-
Save blogui91/3327cde04857268dfab78c99c66c210a to your computer and use it in GitHub Desktop.
Settings for authetications
This file contains 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
export const STATUS = 'local'; | |
let secrets = { | |
API_LOCAL : 'mysecretinlocal', | |
API_DEV : 'mysecretindev', | |
API_PRODUCTION : 'mysecretinproduction' | |
} | |
export const BASE_URL = { | |
'local' : 'http://localhost:8000/', | |
'dev' : 'https://api-dev.myapp.com/', | |
'production' : 'https://api.myapp.com/', | |
} | |
export const API_URL = BASE_URL[STATUS] + 'api/' | |
export const BASE_TOKEN = BASE_URL[STATUS] | |
function getSecret(value = ''){ | |
return 'API_' + value.toUpperCase() | |
} | |
let secret = getSecret(STATUS); | |
const CLIENT_SECRET = secrets[ secret ] | |
export default { | |
oauth : { | |
grand_type : 'password', | |
client_id : 2, | |
client_secret : CLIENT_SECRET, | |
scope : '*' | |
}, | |
default_storage : 'Cookies' //Supported Types 'Cookies', 'Localstorage' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Emmm ...
grand_type
orgrant_type
???