Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (getRuntimeEnv() == RuntimeEnv.ELECTRON_RENDERER) {
vue.onSignInSuccessWithAuthResult();
return false;
} else {
return true;
}
},
uiShown: function () {
// The widget is rendered.
// Hide the loader.
}
},
signInSuccessUrl: '/home',
signInOptions: Services.getInstance().config.authProviders,
};
let ui = firebaseui.auth.AuthUI.getInstance() ? firebaseui.auth.AuthUI.getInstance() : new firebaseui.auth.AuthUI(firebase.auth());
ui.start('#firebaseui-auth-container', uiConfig);
console.log(Services.getInstance().config.authProviders);
}
import constants from '../constants';
import firebaseConf from '../configs/firebase';
const parser = new UAParser();
const browserName = parser.getBrowser().name;
const osName = parser.getOS().name;
const deviceType = parser.getDevice().type;
let database;
let auth;
let messaging;
let storage;
if (process.env.NODE_ENV !== 'test') {
firebase.initializeApp(firebaseConf);
database = firebase.database();
auth = firebase.auth();
if (constants.SUPPORTEDBROWSERS.indexOf(browserName) >= 0 && osName !== 'iOS') { // safari,iosではエラーになるため
messaging = firebase.messaging();
}
storage = firebase.storage();
}
export default {
/**
* firebaseのdatabaseを返します。
*/
getDatabase() {
return database;
},
/**
* firebaseのauthを返します。
*/
resetPassword(email: string) {
const fbAuth = firebase.auth();
return fbAuth
.sendPasswordResetEmail(email)
.then(() => {
console.log('密码已发到你的邮箱中');
})
.catch(error => console.log('密码重置出错', error));
}
import {firebase} from '@firebase/app';
import '@firebase/auth';
import '@firebase/database';
import config from '../config';
const appFirebase = firebase.initializeApp({
apiKey: config.firebaseApiKey,
authDomain: `${config.firebaseApp}.firebaseapp.com`,
databaseURL: `https://${config.firebaseApp}.firebaseio.com`,
});
const auth = firebase.auth(appFirebase);
const database = firebase.database(appFirebase);
const githubAuthProvider = new firebase.auth.GithubAuthProvider();
githubAuthProvider.addScope('gist');
githubAuthProvider.addScope('public_repo');
export {auth, database, githubAuthProvider};
render() {
return (
<div>
<div>
<h1>Genesys Emporium</h1>
<h2>Genesys Character Creator</h2>
<img style="{{maxHeight:" alt="" src="{images.CRB.Logo}">
</div>
);
}
}</div>