Skip to content

Instantly share code, notes, and snippets.

@blogui91
Last active October 21, 2017 15:14
Show Gist options
  • Save blogui91/3327cde04857268dfab78c99c66c210a to your computer and use it in GitHub Desktop.
Save blogui91/3327cde04857268dfab78c99c66c210a to your computer and use it in GitHub Desktop.
Settings for authetications
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'
}
@tahq69
Copy link

tahq69 commented Oct 21, 2017

Emmm ... grand_type or grant_type ???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment