Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static getToken(params) {
- const cookies = new Cookies()
- return axios.post(backendDomen + '/api/oauth/token', {
- client_id: clientId,
- client_secret: secret,
- grant_type: 'password',
- username: params.email,
- password: params.password,
- scope: '*'
- })
- .then(function (result) {
- if (result.data.access_token) {
- cookies.set('token', result.data.access_token, { path: '/' })
- window.location.replace('/brokers/customers/list')
- }
- }).catch(function (reason) {
- return reason.response
- })
- }
Add Comment
Please, Sign In to add comment