feat: google client id for oauth

This commit is contained in:
zerosoul
2022-05-16 16:53:04 +08:00
parent 117c2e35de
commit 7987d10be7
7 changed files with 102 additions and 63 deletions
+1
View File
@@ -8,6 +8,7 @@ const whiteList = [
"register",
"sendMagicLink",
"checkInviteTokenValid",
"getGoogleAuthConfig",
"getLoginConfig",
"getServer",
"getOpenid",
+12
View File
@@ -47,6 +47,16 @@ export const serverApi = createApi({
getFirebaseConfig: builder.query({
query: () => ({ url: `admin/fcm/config` }),
}),
getGoogleAuthConfig: builder.query({
query: () => ({ url: `admin/google_auth/config` }),
}),
updateGoogleAuthConfig: builder.mutation({
query: (data) => ({
url: `admin/google_auth/config`,
method: "POST",
body: data,
}),
}),
sendTestEmail: builder.mutation({
query: (data) => ({
url: `/admin/system/send_mail`,
@@ -151,6 +161,8 @@ export const serverApi = createApi({
});
export const {
useGetGoogleAuthConfigQuery,
useUpdateGoogleAuthConfigMutation,
useGetSMTPStatusQuery,
useSendTestEmailMutation,
useUpdateFirebaseConfigMutation,