LSSE-front/src/utils/openThirdLogin.js

12 lines
357 B
JavaScript
Raw Normal View History

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))
}