This is a feature implementation for Google sign-in in your Flutter application without using Firebase
- Google Sign-in, Sign-out.
- access to the user's public details on the screen.
![](https://private-user-images.githubusercontent.com/91900783/251971763-8e7ffd51-d1cc-4893-8c8c-3ba846d53fc1.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5ODkyMzgsIm5iZiI6MTcyNDk4ODkzOCwicGF0aCI6Ii85MTkwMDc4My8yNTE5NzE3NjMtOGU3ZmZkNTEtZDFjYy00ODkzLThjOGMtM2JhODQ2ZDUzZmMxLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDAzMzUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE3MWY2ZjkwNDc5MWE4ZGNlMmMwNGFmYTEyY2RhMWIxNTg3MzUwMmQ4MDY1YmMwNGYyN2FhZGNjYjYwNDQ3MDcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Ymf6nBgDVclmhNsD3WoN8B6bvCClLxWPIzClOaCod5s)
![](https://private-user-images.githubusercontent.com/91900783/251971767-1b8b0567-96d8-4c37-a26e-85b828acb124.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5ODkyMzgsIm5iZiI6MTcyNDk4ODkzOCwicGF0aCI6Ii85MTkwMDc4My8yNTE5NzE3NjctMWI4YjA1NjctOTZkOC00YzM3LWEyNmUtODViODI4YWNiMTI0LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDAzMzUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNjMTY4YWIyYTExZjkxNWM2ZTMwZDkwZWE0ZDMzYjQyOTE5NmRhZjg2NjUzMWE5MDdhNDMzYjM3NGM3NDNmZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.tsSWptnXFh6HTHOQlSO9h1v3juTQUk8kade1jnW1qfA)
![](https://private-user-images.githubusercontent.com/91900783/251971771-04df1fa7-bf2d-4ced-8743-d37b1f274911.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5ODkyMzgsIm5iZiI6MTcyNDk4ODkzOCwicGF0aCI6Ii85MTkwMDc4My8yNTE5NzE3NzEtMDRkZjFmYTctYmYyZC00Y2VkLTg3NDMtZDM3YjFmMjc0OTExLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDAzMzUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiMWQ1M2M2MWUwNzViZDJlODdjNzgwMjFlNmE0MDRmMTJkMGZkYWVlZjk3MDE1OTMxYmQ5NDY5ZWM4OGY5YWEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hMu59kjq44tT0QJLxELxcGtAX6eL4D3ZSNu4iHY1CSQ)
![](https://private-user-images.githubusercontent.com/91900783/251971770-d0968ded-a183-4d67-b9f2-458571155167.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5ODkyMzgsIm5iZiI6MTcyNDk4ODkzOCwicGF0aCI6Ii85MTkwMDc4My8yNTE5NzE3NzAtZDA5NjhkZWQtYTE4My00ZDY3LWI5ZjItNDU4NTcxMTU1MTY3LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDAzMzUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRjOTA1ZTZiODM0ZDNkMGFkOWM2YjVhZTFjMjZmZDM5MzYwNDNkMGJhNjYxOWU2OTRiN2E1NTU4ODdlNDA5YmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.GkwXGkNBPCsOt9KZ5BNP8mnMfcBYcimBWinlcb3JbPo)
![](https://private-user-images.githubusercontent.com/91900783/251971777-8a9ccc4d-c61f-44e2-abae-8a4b27cf053b.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5ODkyMzgsIm5iZiI6MTcyNDk4ODkzOCwicGF0aCI6Ii85MTkwMDc4My8yNTE5NzE3NzctOGE5Y2NjNGQtYzYxZi00NGUyLWFiYWUtOGE0YjI3Y2YwNTNiLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDAzMzUzOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZmY2VmMmU5NTlkM2FkYzRiNmMzZWE4NDM2ODkwZmVlZGE3ZDdkNmJiMTg4ZjliZWZjNDIzZjlkZmRiYWExMjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ANyJKl1M67_oufYGlzQrLM4aOJqT48i5EsVbX2SvjWc)
- This project is licensed under the MIT License - see the LICENSE file for details
go to
google-cloud-console
-->create-a-project
-->OAuth consent screen
-->external
-->complete your app registration
.
Now navigate to
credentials
, then click on create credentials
and select OAuth Client ID
:
-
Create
OAuth Client Id
by filling in the details. -
it will require an
SHA-1 certificate fingerprint
andpackage name
:- to get
SHA-1 certificate fingerprint
-->- Open your Flutter project's root directory.
- Open cmd or PowerShell
- and run command
cd android ./gradlew signingReport
- to get
package name
-->- go to
build.gradle
and check your package name.
- go to
- to get
-
complete your credentials creation after filling it with details above.
Go to URL —
https://docs.flutter.dev/deployment/android
and follow instructions for Create an upload keystore
.
- Run the command given over there as per your os anywhere on the desktop and it will create .jks file.
- moves this file to,
android
-->app
of the flutter project directory. - update
build.gradle
file by adding the below code under the Android section:
signingConfigs{
debug{
keyAlias 'androiddebugkey'
keyPassword yourpassword'
storeFile file('upload-keystore.jks')
storePassword 'yourpassword'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now,
// so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
open your command prompt & go to the directory where you want to create your flutter project.
git clone https://github.com/akashmishra242/flutter_onesignal_push_notification.git #to fork this flutter project
cd .\flutter_onesignal_push_notification\ #navigate to the woking directory
code . #open your vs code
now to run the app, run the following command in VS Code Terminal(flutter):
flutter pub get #to install and update packages & dependencies.
flutter run #to run the flutter app
Give your feedback at akashmishra242@gmail.com