mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat: 新增单点登录回调页面
This commit is contained in:
@ -62,15 +62,16 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
*
|
||||
* @param [redirect=true] Whether to redirect after login. Default is `true`
|
||||
*/
|
||||
async function login(loginForm: Api.Auth.PwdLoginForm, redirect = true) {
|
||||
async function login(loginForm: Api.Auth.PwdLoginForm | Api.Auth.SocialLoginForm, redirect = true) {
|
||||
startLoading();
|
||||
|
||||
const { VITE_APP_CLIENT_ID } = import.meta.env;
|
||||
|
||||
const loginData: Api.Auth.PwdLoginForm = {
|
||||
...loginForm,
|
||||
tenantId: loginForm.tenantId ?? '000000',
|
||||
clientId: VITE_APP_CLIENT_ID!,
|
||||
grantType: 'password'
|
||||
grantType: loginForm.grantType ?? 'password'
|
||||
};
|
||||
|
||||
const { data: loginToken, error } = await fetchLogin(loginData);
|
||||
|
Reference in New Issue
Block a user