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
-2
View File
@@ -20,8 +20,6 @@ export const firebaseConfig = {
measurementId: "G-XV476KEC8P",
};
export const vapidKey = `BGXCn-5YRXSFw38Q9lUKJ5bibL212-yIQn1pCvthGhp6_KwA29FO1Ax_d_7if1vfC2a5wTSVO8AcZrc-Hm1aS0Y`;
export const googleClientID =
"418687074928-naojba82n9ktf0rkvnqoor4nhr54ql1b.apps.googleusercontent.com";
// "840319286941-6ds7lbvk55eq8mjortf68cb2ll65lprt.apps.googleusercontent.com";
export const tokenHeader = "X-API-Key";
export const FILE_SLICE_SIZE = 1000 * 200 * 8; //200kb
+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,