Allowed domains env variable for Google Auth (#682)
* Allowed domains env variable for Google Auth * Fixing lint errors * PR comments. Use includes instead of indexOf
This commit is contained in:
@@ -10,7 +10,7 @@ import SigninButtons from './components/SigninButtons';
|
||||
import { developers, githubUrl } from '../../shared/utils/routeHelpers';
|
||||
|
||||
type Props = {
|
||||
notice?: 'google-hd' | 'auth-error',
|
||||
notice?: 'google-hd' | 'auth-error' | 'hd-not-allowed',
|
||||
lastSignedIn: string,
|
||||
googleSigninEnabled: boolean,
|
||||
slackSigninEnabled: boolean,
|
||||
@@ -38,6 +38,12 @@ function Home(props: Props) {
|
||||
try signing in with your company Google account.
|
||||
</Notice>
|
||||
)}
|
||||
{props.notice === 'hd-not-allowed' && (
|
||||
<Notice>
|
||||
Sorry, your Google apps domain is not allowed. Please try again
|
||||
with an allowed company domain.
|
||||
</Notice>
|
||||
)}
|
||||
{props.notice === 'auth-error' && (
|
||||
<Notice>
|
||||
Authentication failed - we were unable to sign you in at this
|
||||
|
||||
Reference in New Issue
Block a user