-
Notifications
You must be signed in to change notification settings - Fork 9
Feature: Log in with Google in Flutter App #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@miguelmartins17 the Medium post above uses Firebase Authentication. If you are able to use Firebase Authentication without storing any personal information on Firebase, then this could be an option. But if it is not possible to use Firebase without storing data on Firebase, Please write up the steps you have taken so far so that anyone else can follow along. |
@nelsonic I think it's impossible to use the firebase without keeping personal information. |
@miguelmartins17 let's look at it together tomorrow morning. 👍 |
@nelsonic I think I found a solution. |
@miguelmartins17 cool. Please share links and as much details as you can here. 👍 |
I think I found the solution for how to login with google without using Firebase I leave here the link: |
@miguelmartins17 looks promising. 👍 |
Even without using Firebase one of the steps to login with Google is to register the application on the Google console which includes registering the application in Firebase. |
|
First we need to register the app so we have to enable the Google People API. From my research I think we can do that from this link. It's done at pubspec.yaml just adding it to the dependencies: And then if we go through this link: We were able to register our application. So far it's the only way I've found that it can work and take us to the next stage. |
@miguelmartins17 please take a look at the WebView SPIKE #5 |
Thanks for the research/links above ⬆️ I'm going to have a look first a the google signin package: https://pub.dev/packages/google_sign_in The next step is to find a way to create a unique token for each user, this should be done on the API server. Once this token is created we need to find a way to save it on the application. Finally for each new API requests from the application we can use the Authorization header containing the token. The server will validate the request and allow or block the response: I've also find the following link: https://www.didierboelens.com/2018/05/token-based-communication-with-server---part-1/ Flutter with Python: https://www.youtube.com/watch?v=Nikdbz6gBek&list=PL5tVJtjoxKzrC1dRdj9AsRKcYO33pK76P&index=1 |
The following issue: flutter/flutter#36673 suggests that we can bypass Firebase by setting the configuration values directly into Google cloud platform. I've created a new application, and added the sha-1 key however I still have an issue: It seems that the oauth consent screen fields need to be all set with a values which in my case are. I continue to investigate... |
@SimonLab this still implies that we are forced to use GCP for our App. 💭 |
This morning I have tried again to use the https://pub.dev/packages/google_sign_in package. I'm going to try one last time to create a new application (without the Firebase setup) and I'll add the steps I've done in the following comment. |
@SimonLab Hello, this video can be used as a help/reference if you want to login with Google without using Firebase. 💭 |
dependencies:
flutter:
sdk: flutter
google_sign_in: ^4.1.1
http: ^0.12.0+4
I'm guessing the error is due to the sha-1 key not matching the google application, however as the debug error are not useful it is difficult to debug. @miguelmartins17 have you tried/managed to use the google_singnin package on your machine? |
@SimonLab Yes, and I didn't get any error, so it will be difficult to identify what the solution will be. |
@SimonLab I'm going back to Windows (for a few minutes) because that's where I was able to run the application. |
@SimonLab Are you using Firebase? 🤔 I |
Thanks for the links @miguelmartins17 which editor/IDE are you using, Android Studio? I'm currently working with VScode.
My goal while trying the google signin package is to determine how quickly it is to setup and how easy it is to use. At the moment there are two main blockers:
I'm sure I'm still missing some steps or don't understand some points/flutter concepts to be able to make it work yet. |
@SimonLab Have you opened any issues explaining this situation (we're trying to do something that should be relatively simple and not require firebase) on the flutter repo or stack overflow that we could upvote? |
Uh oh!
There was an error while loading. Please reload this page.
The starting point for people using the @dwyl Native App is Login.
We are using Sign in with Google for the Web App and people will expect it for the Native Mobile app.
Todo
This looks like a good starting point:
see: https://github.com/dwyl/elixir-auth-google/blob/master/create-google-app-guide.md
display their details as shown in the image above ⬆️
and https://github.com/dwyl/elixir-auth-google-demo
google-login-flutter.md
to capture your notes.Try and make the appearance as similar to the Web App as possible.
(if you need any help with colors or logos, please leave comments below with your questions)
The text was updated successfully, but these errors were encountered: