skip to Main Content

Firebase – Should I pass the google sign-in variables to other class?

I made a log-in page and made a button for google log-in like this : Future<String> login_google() async{ FirebaseAuth auth = FirebaseAuth.instance; GoogleSignIn googleSignIn = GoogleSignIn(); GoogleSignInAccount? account = await googleSignIn.signIn(); GoogleSignInAuthentication authentication = await account!.authentication; AuthCredential credential = GoogleAuthProvider.credential(…

VIEW QUESTION

Download an image hosted in Firebase

I have a URL like this who corresponds to an image shown in a website: https://firebasestorage.googleapis.com/v0/b/welook-siwe.appspot.com/o/moments%2F58810%2Ffe2c6769-af55-4fb3-a73f-4bac3bb2dbc3?alt=media&token=a123aaa3-7e77-4f1a-88cb-9f5169fd5b6e I need to download that image but i can't because it just downloads me this kind of file when i click on the URL:…

VIEW QUESTION

How to call newuser() function in button onlick? (Firebase)

<!DOCTYPE html> <html lang="ko"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> <title>DB Test</title> </head> <body> <a><h1>DB Test</h1></a> <div class="input-box"> <input id="email" type="text" name="username" placeholder="email"> <label for="email">Email</label> </div> <div class="input-box"> <input id="password" type="password" name="password" placeholder="pw"> <label for="password">password</label> </div>…

VIEW QUESTION

Get DocumentSnapshot by its id from Firebase collection

I'm trying to get DocumentSnapshot from collection this my code Stream<QuerySnapshot> streamState() => collectionRef.snapshots(); return StreamBuilder<QuerySnapshot>( stream: auth.streamState(), builder: (BuildContext context, AsyncSnapshot<QuerySnapshot> snapshot){ if (snapshot.hasData){ DocumentSnapshot doc = snapshot.data!.docs.elementAt(0); print(doc.id); } return Container( color: Colors.white, ); } ); it work…

VIEW QUESTION
Back To Top
Search