Comments (10)
Can you try adding this bit to app.js
?
from nativescript-plugin-firebase.
@EddyVerbruggen - That did work. However, the e-mail never gets recorded:
{
"uid": "84gfhYMCQ5iVasdCH22A9LE0fndfg14",
"profileImageURL": {},
"email": null,
"emailVerified": false,
...
}
from nativescript-plugin-firebase.
I'm not sure that's expected anyway.. what does the Firebase documentation say?
from nativescript-plugin-firebase.
@EddyVerbruggen - According to this post of yours, you got the email attached? I googled a little and found this. It says (although from the Firebase web API) that this needs to be included in the auth process:
auth.login('facebook', {
rememberMe: true,
scope: 'email,user_likes'
});
Specifically referring to the scope property there. Could that be it?
The Facebook login page should basically say this:
Taken from this video tutorial.
from nativescript-plugin-firebase.
Email is already in the request and that screenshot has an email address because it was added by the 'login by email' type which was merged with the Facebook login (see the envelope above the Facebook logo).
So perhaps Firebase doesn't store the email in the console, but do you also not see the emailaddress in the login callback of the Facebook login? (not sure it should, I don't have access to my test app currently)
from nativescript-plugin-firebase.
Interesting... Well, as stated in a previous post, this is the callback from Facebook login:
{
"uid": "84gfhYMCQ5iVasdCH22A9LE0fndfg14",
"profileImageURL": {},
"email": null,
"emailVerified": false,
"name": [hidden],
"refreshToken": [long token]
}
Email is null
. The rest seem to work (uid, profileImageURL, emailVerified, name, refreshToken).
The Facebook login does ask for the public profile and e-mail address (screenshot in Swedish), but the callback returns email: null
:
As for your email adress being merged from previous email/password account. This is my result of it:
My Facebook uses the same e-mail address as the other one marked in red. Firebase created a new account because the e-mail was, for some reason, never received.
from nativescript-plugin-firebase.
I found the issue and it seems to be a problem with Firebase itself. I had to check "One account per email address" in the Firebase Sign-in Method page. That way the email property will get the e-mail address.
Though I still think it is weird that you managed to combined the accounts together 🤔
from nativescript-plugin-firebase.
I had that option checked from the get go. This particular user was already registered via email and later logged on via Facebook with the same email address. Then this line of code kicked in and linked the two.
from nativescript-plugin-firebase.
@EddyVerbruggen Ah, I see! However, I got the alert/error "email already in use" (or something like that) if I already had an account with the same email address (pretty sure that's what the option is for - to prevent double accounts).
This solved my issue though. So thank you for your help!
from nativescript-plugin-firebase.
If you feel this needs to be documented in the readme, or is useful for others to know, please send a PR for the readme.
Happy coding!
from nativescript-plugin-firebase.
Related Issues (20)
- M1 Issue - FirebaseSDK HOT 4
- Several "session_start" event are created on iOS 15 HOT 1
- ERROR TypeError: firebase.init is not a function.
- AdMob error: TypeError: Cannot set property 'resolve' of undefined
- Class constructor ContentView cannot be invoked without 'new'
- Android App Not working with NS 8.2. HOT 42
- A problem occurred configuring root project 'firebase'.
- microsoft login
- Android 12 background notification led to crash (PendingIntent) HOT 6
- Unable to run new deployment HOT 1
- ion
- Error trying to install @nativescript/firebase
- barcode scanning issue - iPhone 13 Pro and iPhone 13 Pro max
- Cannot read property 'ads' of undefined on NativeScript 8.2.3 HOT 1
- Plugin with id 'com.google.gms.google-services' not found. HOT 13
- SetValue of type Date Error on iOS
- Barcode Scanning issue on native script 8 with native camera control
- Mark this repository as deprecated HOT 1
- Firebase Authentication functions are giving error "No reference found.
- Firebase Messaging crash issue in Android 13 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-plugin-firebase.