mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
Improvements and fixes on OAuth providers (#304)
This commit is contained in:
committed by
GitHub
parent
32d19cbe7c
commit
39a757fe5b
@@ -28,7 +28,12 @@ const OAuthProviderItem = ({
|
||||
}: Props) => (
|
||||
<li className="oAuthListItem">
|
||||
<div className="oAuthInfo">
|
||||
<img src={oAuth.logo} className="oAuthLogo" width={42} height={42} />
|
||||
{
|
||||
oAuth.logo && oAuth.logo.length > 0 ?
|
||||
<img src={oAuth.logo} className="oAuthLogo" width={42} height={42} />
|
||||
:
|
||||
<div className="oauthLogo" style={{width: 42, height: 42}}></div>
|
||||
}
|
||||
|
||||
<div className="oAuthNameAndEnabled">
|
||||
<span className="oAuthName">{oAuth.name}</span>
|
||||
|
||||
@@ -91,7 +91,7 @@ const TenantSignUpP = ({
|
||||
if (authMethod == 'oauth') {
|
||||
let redirectUrl = new URL(baseUrl);
|
||||
redirectUrl.hostname = `${subdomain}.${redirectUrl.hostname}`;
|
||||
window.location.href = `${redirectUrl.toString()}users/sign_in`;
|
||||
window.location.href = redirectUrl.toString();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ const OAuthProviderLink = ({ oAuthId, oAuthName, oAuthLogo, oAuthReason, isSignU
|
||||
onClick={() => window.location.href = `/o_auths/${oAuthId}/start?reason=${oAuthReason}`}
|
||||
className={`oauthProviderBtn oauthProvider${oAuthName.replace(' ', '')}`}
|
||||
>
|
||||
<img src={oAuthLogo} alt={oAuthName} width={28} height={28} />
|
||||
{ oAuthLogo && oAuthLogo.length > 0 && <img src={oAuthLogo} alt={oAuthName} width={28} height={28} /> }
|
||||
<span className='oauthProviderText'>
|
||||
{
|
||||
isSignUp ?
|
||||
|
||||
Reference in New Issue
Block a user