firebase-authentication

Managing Session Cookies with Firebase and Electron

泪湿孤枕 提交于 2021-01-27 13:34:08
问题 I am trying to set up session cookies in my Node server, which is the backend for an Electron app. I am trying to follow this guide. https://firebase.google.com/docs/auth/admin/manage-cookies The first thing I am confused about is where this function comes from in the "Sign In" section: const csrfToken = getCookie('csrfToken') Is 'getCookie' a function I am supposed to write myself? I am also not fully following the logic of the "create session cookie" snippet: const csrfToken = req.body

Managing Session Cookies with Firebase and Electron

不羁岁月 提交于 2021-01-27 13:24:29
问题 I am trying to set up session cookies in my Node server, which is the backend for an Electron app. I am trying to follow this guide. https://firebase.google.com/docs/auth/admin/manage-cookies The first thing I am confused about is where this function comes from in the "Sign In" section: const csrfToken = getCookie('csrfToken') Is 'getCookie' a function I am supposed to write myself? I am also not fully following the logic of the "create session cookie" snippet: const csrfToken = req.body

Firebase Cloud Function - null user.displayName onCreate

人盡茶涼 提交于 2021-01-27 13:16:22
问题 I'm trying to write a function that will send a welcome email on user creation. I followed along to this tutorial, which says that one can access the newly created user's displayName with user.displayName , though it keeps returning null for me. I realized that the probable reason that this happens (correct me if I'm wrong here) is that registration and setting the user's displayName happens in two separate steps client-side and therefore when onCreate is triggered, user.displayName will

Explicit renewal of session tokens in Firebase JS SDK

旧街凉风 提交于 2021-01-27 12:46:54
问题 I have implemented the signin method using Firebase Auth for several providers like that: firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL).then(() => { let provider = new firebase.auth.GoogleAuthProvider(); // + facebook, gitHub provider.addScope('profile'); provider.addScope('email'); firebase.auth().signInWithPopup(provider).then(result => { // app logic here However this code gives me 60 min lasting sessions and I want to learn how to automatically renew the current

How to setup a duplicate project in firebase? [duplicate]

南笙酒味 提交于 2021-01-27 12:05:10
问题 This question already has answers here : How to clone an existing Firebase project data to another new project? (3 answers) Closed 1 year ago . I would like to create a duplicate project in firebase so that I dont have to go through the hassle of adding the firebase functions and notifications etc. If I could I would just delete all auth users so that its ready for the actual app but I am unable to do that. So How can I set up a duplicate project but without all the authenticated test users?

How to setup a duplicate project in firebase? [duplicate]

谁说我不能喝 提交于 2021-01-27 11:57:29
问题 This question already has answers here : How to clone an existing Firebase project data to another new project? (3 answers) Closed 1 year ago . I would like to create a duplicate project in firebase so that I dont have to go through the hassle of adding the firebase functions and notifications etc. If I could I would just delete all auth users so that its ready for the actual app but I am unable to do that. So How can I set up a duplicate project but without all the authenticated test users?

Usage of Firebase SCrypt params in nodejs scrypt package

痴心易碎 提交于 2021-01-27 11:23:25
问题 I've been struggling with this for some time now, hopefully someone has done this before and can help me on my way. I went to the Firebase people to request the scrypt params in order to migrate our user authentication away from Firebase to our own server. Now I got those params, but I have no clue as how they should map towards the node scrypt package (https://www.npmjs.com/package/scrypt). The Firebase params are of the following format: hash_config: { algorithm: SCRYPT, base64_signer_key:

Unable to google login: auth/redirect-cancelled-by-user

北城余情 提交于 2021-01-27 06:13:31
问题 I have followed all the steps listed here: https://firebase.google.com/docs/auth/web/cordova, verified all the information but I am still getting the error below. code: "auth/redirect-cancelled-by-user", message: "The redirect operation has been cancelled by the user before finalizing." I have the correct config information in my app My firebase config matches my firebase's console's config. I have the correct dynamic link. I have installed all the required plugins SHA certificate

Getting user name, lastname and ID in Firebase

。_饼干妹妹 提交于 2021-01-27 05:51:46
问题 I created a login/register using firebase, and it's working fine. But I need to get name and lastname from the user. How can I do this? And I'd like to know if it's possible to get an ID from the user, because I want to create a Rank Page in my app, so only an ID would be unique to do this. 回答1: To get a Unique ID, you can use: FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser(); String uid = user.getUid(); To get his name (I never tried this in Email/password auth, but it works

Firebase Admin SDK apply action code for email verification

戏子无情 提交于 2021-01-27 05:48:32
问题 The Firebase Customize the Email Action Handler guide gives an example of verifying a user's email address on a custom URL to a site hosted through Firebase. However, I want the custom URL to point to a Firebase cloud function endpoint URL and use admin SDK to verify the oob code instead. But there is no such function as applyActionCode for the admin.auth() . Is verifying email through a hosted site using javascript the only way to go? I don't really want to expose the code to the browser.