mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
Merge pull request #1708 from makeplane/fix/google_authentication
fix: google not accepting width as string
This commit is contained in:
commit
30054f71a8
@ -20,17 +20,21 @@ export const GoogleLoginButton: FC<IGoogleLoginButton> = ({ handleSignIn }) => {
|
|||||||
callback: handleSignIn,
|
callback: handleSignIn,
|
||||||
});
|
});
|
||||||
|
|
||||||
window?.google?.accounts.id.renderButton(
|
try {
|
||||||
googleSignInButton.current,
|
window?.google?.accounts.id.renderButton(
|
||||||
{
|
googleSignInButton.current,
|
||||||
type: "standard",
|
{
|
||||||
theme: "outline",
|
type: "standard",
|
||||||
size: "large",
|
theme: "outline",
|
||||||
logo_alignment: "center",
|
size: "large",
|
||||||
width: "360",
|
logo_alignment: "center",
|
||||||
text: "signin_with",
|
width: 360,
|
||||||
} as GsiButtonConfiguration // customization attributes
|
text: "signin_with",
|
||||||
);
|
} as GsiButtonConfiguration // customization attributes
|
||||||
|
);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
|
|
||||||
window?.google?.accounts.id.prompt(); // also display the One Tap dialog
|
window?.google?.accounts.id.prompt(); // also display the One Tap dialog
|
||||||
|
|
||||||
@ -50,7 +54,7 @@ export const GoogleLoginButton: FC<IGoogleLoginButton> = ({ handleSignIn }) => {
|
|||||||
<>
|
<>
|
||||||
<Script src="https://accounts.google.com/gsi/client" async defer onLoad={loadScript} />
|
<Script src="https://accounts.google.com/gsi/client" async defer onLoad={loadScript} />
|
||||||
<div
|
<div
|
||||||
className="overflow-hidden rounded w-full flex justify-center items-center !text-sm !font-medium !text-custom-text-100"
|
className="overflow-hidden rounded w-full"
|
||||||
id="googleSignInButton"
|
id="googleSignInButton"
|
||||||
ref={googleSignInButton}
|
ref={googleSignInButton}
|
||||||
/>
|
/>
|
||||||
|
2
apps/app/google.d.ts
vendored
2
apps/app/google.d.ts
vendored
@ -37,7 +37,7 @@ interface GsiButtonConfiguration {
|
|||||||
text?: "signin_with" | "signup_with" | "continue_with" | "signup_with";
|
text?: "signin_with" | "signup_with" | "continue_with" | "signup_with";
|
||||||
shape?: "rectangular" | "pill" | "circle" | "square";
|
shape?: "rectangular" | "pill" | "circle" | "square";
|
||||||
logo_alignment?: "left" | "center";
|
logo_alignment?: "left" | "center";
|
||||||
width?: string;
|
width?: number;
|
||||||
local?: string;
|
local?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user