LSSE-front/src/utils/openThirdLogin.js
2025-09-07 19:04:14 +08:00

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