[Config] Add enable OAuth login option
This commit is contained in:
@@ -150,6 +150,21 @@ export class LoginComponent extends Component<ILoginComponentProps, ILoginCompon
|
||||
render() {
|
||||
const { classes, loginWithOAuth, translate } = this.props
|
||||
|
||||
const OAuthLogin = (
|
||||
<div style={this.styles.singinOptions as any}>
|
||||
<IconButton
|
||||
onClick={() => loginWithOAuth!(OAuthType.FACEBOOK)}
|
||||
><div className='icon-fb icon'></div></IconButton>
|
||||
<IconButton
|
||||
onClick={() => loginWithOAuth!(OAuthType.GOOGLE)}
|
||||
> <div className='icon-google icon'></div> </IconButton>
|
||||
<IconButton
|
||||
onClick={() => loginWithOAuth!(OAuthType.GITHUB)}
|
||||
> <div className='icon-github icon'></div> </IconButton>
|
||||
|
||||
</div>
|
||||
)
|
||||
|
||||
return (
|
||||
<Grid container spacing={24}>
|
||||
<Grid item xs={12} className={classes.contain}>
|
||||
@@ -167,18 +182,8 @@ export class LoginComponent extends Component<ILoginComponentProps, ILoginCompon
|
||||
|
||||
<h2 className='zoomOutLCorner animated g__paper-title'>{translate!('login.title')}</h2>
|
||||
</div>
|
||||
<div style={this.styles.singinOptions as any}>
|
||||
<IconButton
|
||||
onClick={() => loginWithOAuth!(OAuthType.FACEBOOK)}
|
||||
><div className='icon-fb icon'></div></IconButton>
|
||||
<IconButton
|
||||
onClick={() => loginWithOAuth!(OAuthType.GOOGLE)}
|
||||
> <div className='icon-google icon'></div> </IconButton>
|
||||
<IconButton
|
||||
onClick={() => loginWithOAuth!(OAuthType.GITHUB)}
|
||||
> <div className='icon-github icon'></div> </IconButton>
|
||||
|
||||
</div>
|
||||
{config.settings.enabledOAuthLogin ? OAuthLogin : ''}
|
||||
|
||||
<Divider style={this.styles.divider} />
|
||||
<TextField
|
||||
className={classes.textField}
|
||||
|
||||
@@ -10,6 +10,7 @@ export const environment = {
|
||||
messagingSenderId: '964743099489'
|
||||
},
|
||||
settings: {
|
||||
enabledOAuthLogin: true,
|
||||
appName: 'Green',
|
||||
defaultProfileCover: 'https://firebasestorage.googleapis.com/v0/b/open-social-33d92.appspot.com/o/images%2F751145a1-9488-46fd-a97e-04018665a6d3.JPG?alt=media&token=1a1d5e21-5101-450e-9054-ea4a20e06c57',
|
||||
defaultLanguage: LanguageType.English
|
||||
|
||||
@@ -10,6 +10,7 @@ export const environment = {
|
||||
messagingSenderId: '964743099489'
|
||||
},
|
||||
settings: {
|
||||
enabledOAuthLogin: true,
|
||||
appName: 'Green',
|
||||
defaultProfileCover: 'https://firebasestorage.googleapis.com/v0/b/open-social-33d92.appspot.com/o/images%2F751145a1-9488-46fd-a97e-04018665a6d3.JPG?alt=media&token=1a1d5e21-5101-450e-9054-ea4a20e06c57',
|
||||
defaultLanguage: LanguageType.English
|
||||
|
||||
Reference in New Issue
Block a user