firebase-authentication

Plugin project :firebase_core_web not found

折月煮酒 提交于 2020-06-20 15:33:46
问题 I try to connect Android project to Firebase but I get this error as I added the following to pubsec.yaml: firebase_auth: ^0.16.0 cloud_firestore: ^0.13.5 when I gradle run and it is not working Plugin project :firebase_core_web not found. Please update settings.gradle. Plugin project :firebase_auth_web not found. Please update settings.gradle. Plugin project :cloud_firestore_web not found. Please update settings.gradle. Is there any solution for it 回答1: In your android/app/build.gradle ,

How to authenticate with phone number in flutter with firebase?

偶尔善良 提交于 2020-06-17 16:51:06
问题 I'm new to flutter, and using firebase to authenticate with phone number but I m unable to authenticate. I browsed for it but couldn't get any satisfying solution. I implemented some code from the StackOverflow but there is occurring Exception 'Unhandled Exception: type '(FirebaseUser) => Null' is not a subtype of type '(AuthCredential) => void' in type cast' and couldn't catch the Exception. signIn()async{ AuthCredential credential= PhoneAuthProvider.getCredential( verificationId:

Setting Custom claims manually in firebase console [duplicate]

戏子无情 提交于 2020-06-17 09:34:17
问题 This question already has an answer here : Firebase - how to set custom claim from the console [duplicate] (1 answer) Closed 3 days ago . Is there a way I can assign admin roles or custom claims to a user mannually in the firebase console without going through firebase functions. Basically I want get one user in the database with all the roles for testing purposes 回答1: At the time of writing, there isn't any way to add/remove Custom Claims manually from the Firebase console. You need indeed

React Authentication Context being null initially

时光总嘲笑我的痴心妄想 提交于 2020-06-17 06:22:50
问题 I'm using React contexts in order to hold my authentication state for my application. Currently, I'm having an issue where whenever I try and hit /groups/:id , it always redirects me to /login first and then to /UserDash . This is happening because the context of my AuthProvider isn't updating fast enough, and my Private Route utilized the AuthContext to decide whether to redirect or not. <AuthProvider> <Router> <Switch> <LoggedRoute exact path = "/" component = {Home}/> <Route exact path = "

What's the difference between instanceId and getIdToken

耗尽温柔 提交于 2020-06-17 04:46:49
问题 I don't understand what's the difference between: FirebaseAuth.getInstance().currentUser.getIdToken(true).addOnSuccessListener { Log.d("tag",it.token) // token #1 } FirebaseInstanceId.getInstance().instanceId.addOnSuccessListener { Log.d("tag", it.token) //token #2 } Both of these methods return some token, what is the difference between them? 回答1: getIdToken(boolean forceRefresh) Fetches a Firebase Auth ID Token for the user; useful when authenticating against your own backend. The

authentification Firebase with Provider flutter

北城以北 提交于 2020-06-16 17:04:16
问题 I tried to implements this Authentification here Firebase with Porvider here the issue is I want to save the state of variable loggedIn even I close and reponning the app so I used this code but dont work class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return Consumer<AuthenticationService>(builder: (_, auth, __) { if (auth.getCurrentUser() != null) return HomeView(); else return TermsView(); }); } } here method to get current user Future getCurrentUser()

How to send FCM notification to all android devices using Node.js

心不动则不痛 提交于 2020-06-15 21:36:36
问题 I want to send the notification to my Android app developed using Ionic t from Node.Js code. I have tried following code and getting Exactly one of topic, token or condition is required. How can I send notification all my users without any condition? var serviceAccount = require("/path/to/config.json"); admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: "https://myApp.firebaseio.com" }); var message = { notification: { title: '$GOOG up 1.43% on the day',

SImple (and) dirty Firestore authentication rule

依然范特西╮ 提交于 2020-06-12 08:34:13
问题 I'm using REST API in a PHP project to send the data to Firestore DB through curl (PHP curl). I'm struggling in understanding how to setup an authentication rule for a "service" and the suggested approach through Google authorization looks overkilling to me. My data must be readable by ALL but writable just by my PHP server. So far I could ensure that a writing operation could happen only if in the dataset sent a specific code is provided (auth=123): service cloud.firestore { match /databases

Firebase Custom Domain Showing “Site Not Found”

雨燕双飞 提交于 2020-06-12 06:41:08
问题 I have verified the Domain Name Also, have linked the A records It's been 24 Hour's since the changes have been made to DNS Records Yet the screen remains same The app works perfectly on Firebase Default Domain. 回答1: If anyone comes here this might help. Usually, it happens because of some kind of error during picking DNS info between the 'www.example.com' and the 'example.com'. What worked for me, is to delete the domain from the firebase console and to reconnect it back. Don't change

Flutter - How to check if the user is logged in, if so show other screen?

冷暖自知 提交于 2020-06-09 10:15:47
问题 My first screen is a login screen and it needs to check if the user is logged in to open the home screen directly but I get an error using this check. I'm doing the check on initState, the condition is returning true, so looks like the problem is with the Navigator. What is the correct way to skip the first screen if the user is logged in? Error: I/flutter (20803): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════ I/flutter (20803): The