Search results
Top results related to sign in with facebook connect with google
Top Answer
Answered Dec 02, 2019 · 6 votes
Adding this late answer since now there is a package, flutter_facebook_login that replaces flutter_facebook_connect. Here is a functioning main.dart example that should work. Just keep in mind you must have followed all configuration as described in the repository and must have a facebook app configured:
import 'package:flutter/material.dart';import 'package:flutter_facebook_login/flutter_facebook_login.dart';import 'dart:async';void main() => runApp(new MyApp());class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter Facebook Login', theme: new ThemeData( primarySwatch: Colors.blue, ), home: new MyHomePage(title: 'Flutter Login Facebook'), ); }}class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => new _MyHomePageState();}class _MyHomePageState extends State<MyHomePage> { login() async { final facebookLogin = new FacebookLogin(); final result = await facebookLogin.logIn(['email']); // final result = await facebookLogin.logInWithReadPermissions(['email']); --> Versions bellow 3.0 switch (result.status) { case FacebookLoginStatus.loggedIn: print(result.accessToken.token); break; case FacebookLoginStatus.cancelledByUser: print('CANCELED BY USER'); break; case FacebookLoginStatus.error: print(result.errorMessage); break; } } @override Widget build(BuildContext context) { return new Scaffold( appBar: new AppBar( title: new Text(widget.title), ), floatingActionButton: new FloatingActionButton( onPressed: login, tooltip: 'Login With Facebook', child: new Icon(Icons.add), ), ); }}
You should see the login screen when clicking bottom right button, and check the printed response on your debug console:
This is the way to go right now since the package actually uses native Facebook Login SDKs on Android and iOS. So no excuse to use Firebase or having to interface yourself!
Hope it helps others who are having troubles with facebook login. And credits go to the package creator roughike
For google signin use google_sign_in, this package is actually quite mature and easier to get going.
1/5
Top Answer
Answered Aug 13, 2021 · 2 votes
The good news is that you do not need to learn OAuth2, you do not need to follow the backend-auth guide linked in your question. This migration actually removes the complexity OAuth2, access and refresh tokens from sign-in. Yes, there is the difficulty of learning and understanding the new and different way of securely sharing the user profile. Hopefully, after cresting over the learning curve you'll see how this makes working with a profile more simple.
JSON Web Tokens (JWTs) are now used to securely share the Google Account profile.
That big pile of text--the credential, it is a base-64 encoded and a JWT. jwt.io has an online JWT decoder that's handy for testing and a nice writeup of working with JWTs. After decode its just a JSON object, no get methods are necessary, just access the individual fields.
All this said, you need to decide whether decode should take place in the user's browser, or on your backend server. This depends upon how you're working with the profile and your setup. Typically, you'd decode on your server after a redirect using data-login_uri in HTML or login_uri in JS.
There are a large number of JWT decode libraries available, so it's very likely you'll be able to add a JWT library, decode it and you're all set to access the individual fields in the credential.
2/5
Top Answer
Answered Apr 16, 2015 · 18 votes
You can now authenticate your users against your django-rest-framework with bearer tokens/third party access tokens from any python-social-auth backend (Facebook, Google, Github, etc.) using this library https://github.com/PhilipGarnero/django-rest-framework-social-oauth2
This module provides a python-social-auth and oauth2 support for django-rest-framework. Thus this saves you a lot of time to setup what is required to have your DRF with social authorization and to be OAuth2 secure.
3/5
Top Answer
Answered Sep 23, 2021 · 3 votes
Nonces are used as a CSRF-prevention method. When you make a request to Google, you include a nonce, and when authentication is complete, Google will send the same nonce back. The magic in this method is that if the nonce does not match what you sent then you can ignore the response, because it was probably spoofed.
Read more about CSRF here: https://owasp.org/www-community/attacks/csrf
Nonces are usually crytographically secure random strings/bytes.
I use crypto-random-string as a base to generate nonces, but any package with this functionality should suffice.
Sometimes I store nonces with a TTL in Redis, but other times I store nonces with an ID attached to the request so I can later verify it.
I'm telling you this since it took a bit long for me to figure out this nonce stuff :P
4/5
Top Answer
Answered Jul 26, 2023 · 9 votes
It seems like Google has changed the type of renderButton width from string to number.
Broken:
window.google.accounts.id.renderButton(button, {width: '200'});-
Working:
window.google.accounts.id.renderButton(button, {width: 200});
They haven't updated the documentation: https://developers.google.com/identity/gsi/web/reference/js-reference#width
5/5
www.geeksforgeeks.org › google-signin-usingGoogle SignIn using Firebase Authentication in ReactJS
www.geeksforgeeks.org › google-signin-using6 hours ago · Go into the get started button, then choose Google provider under Sign-In method. Choose Google as sign in providers. Now choose your support email and save it. After that firebase is connected to your web app, as well ready for authentication purpose. Step 4: Implementing Sign-In Feature.
inet.detik.com › tips-dan-trik › d-7353687Facebook Tidak Bisa Login? Coba 5 Cara Ini untuk Mengatasinya
inet.detik.com › tips-dan-trik › d-73536871 day ago · Hapus Cache dan Cookie Browser. Kemungkinan penyebab pengguna tidak bisa login ke Facebook adalah cache dan cookie browser. Agar bisa login kembali ke Facebook, kamu perlu menghapusnya. Klik tombol Clear Data untuk menghapus cache dan cookie chrome. 3. Pindah ke Browser Lain.
Searches related to sign in with facebook connect with google