12 lines
357 B
JavaScript
12 lines
357 B
JavaScript
export default () => {
|
|
const redirectUri = window.location.origin + window.location.pathname
|
|
window.location.href =
|
|
window._CONFIG.thirdLoginUrl +
|
|
'?response_type=code&active_type=user&state=' +
|
|
Math.random().toString(16).slice(2) +
|
|
'&client_id=' +
|
|
window._CONFIG.clientId +
|
|
'&redirect_uri=' +
|
|
btoa(encodeURI(redirectUri))
|
|
}
|