forked from Unbound-Legends/RPG-Web-Character-Creator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
User.js
59 lines (55 loc) · 1.61 KB
/
User.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import {firebase} from '@firebase/app'
import '@firebase/auth'
import firebaseui from 'firebaseui'
import React, {Component} from 'react';
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth';
import {Container, Row} from 'reactstrap';
import * as images from '../images';
import {About} from './index';
export class User extends Component {
uiConfig = {
signInFlow: 'popup',
autoUpgradeAnonymousUsers: true,
callbacks: {
signInFailure: console.error,
onAuthStateChanged: console.log,
},
signInOptions: [
firebase.auth.GoogleAuthProvider.PROVIDER_ID,
{
provider: firebase.auth.PhoneAuthProvider.PROVIDER_ID,
// Invisible reCAPTCHA with image challenge and bottom left badge.
recaptchaParameters: {
type: 'image',
size: 'invisible',
badge: 'bottomleft'
}
}, firebase.auth.EmailAuthProvider.PROVIDER_ID,
firebaseui.auth.AnonymousAuthProvider.PROVIDER_ID
],
};
render() {
return (
<div>
<Container className='container-fluid my-4'>
<div className={`bg bg-CRB d-print-none`}/>
<Row className='justify-content-center'>
<h1>Genesys Emporium</h1>
</Row>
<Row className='justify-content-center'>
<h2>Genesys Character Creator</h2>
</Row>
<Row className='justify-content-center my-4'>
<img src={images.CRB.Logo} alt='' style={{maxHeight: '150px'}}/>
</Row>
<Row className='justify-content-center my-2'>
<StyledFirebaseAuth uiConfig={this.uiConfig} firebaseAuth={firebase.auth()}/>
</Row>
<Row className='justify-content-center'>
<About/>
</Row>
</Container>
</div>
);
}
}