Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I do "Authenticating Your Client with Google"?

How do I Authenticating Your Client correctly with google? I'm following this tutorial https://developers.google.com/android/guides/client-auth

I copy this text into my command prompt -

keytool -exportcert -list -v \ -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore

I get this message back "-alias is not recognized as an internal or external command, operable program or batch file."

What am doing wrong?

like image 499
CsharpBeginner Avatar asked Dec 09 '15 19:12

CsharpBeginner


People also ask

How to set up Google Authenticator in Gmail?

In the menu that opens, tap the ‘Scan barcode’ option and then scan the code on the web page. The web page will ask you to enter the code shown in the app. Enter it and the set up will be complete. When you sign into your Gmail account, you will have to enter the password for it, and then the code from the Google Authenticator app.

How do I use Google Authenticator on multiple devices?

Google Authenticator can issue codes for multiple accounts from the same mobile device. Each Google Account needs a different secret key. Turn on 2-Step Verification for each account. Learn more about 2-Step Verification. On the devices you want to use, verify Google Authenticator is installed.

Should I use Google Authenticator to log in to websites?

Most sites will have you verify that the code in Authenticator is working before you start using it to log in. The benefits of an app like Google Authenticator, besides not having an SMS message hijacked, are that you have all of the codes in a central location and that they're available all of the time, even when your phone is offline.

How do I remove a Google Authenticator account from my account?

In your Google Account, go to the 2-Step Verification section. If you already set up Google Authenticator for your account, remove that account from Authenticator. Before you remove that account from Authenticator, make sure you have a backup. Learn more about backup codes.


3 Answers

The copied command shouldn't contain the backslash after -v and it must be placed in one single line, like this:

keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore

Besides you have to change the %USERPROFILE% location in the command to the path where the .android directory located. (Maybe it is here: C:\User\YourUserName\ , but you have to check it if it's there)

like image 144
Gex Avatar answered Oct 16 '22 13:10

Gex


set your cmd path to jdk then run this cmd
WINDOWS
keytool -list -v -keystore %USERPROFILE%/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

MAC/LINUX
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

like image 27
Kusal Saraf Avatar answered Oct 16 '22 13:10

Kusal Saraf


I think the end goal is to generate the SHA1 key.

Best Alternative is to follow following steps:

  1. In Android Studio, click on gradle on the right side panel.

enter image description here

  1. And then navigate to app > Tasks > android > signingReport.
  2. Double clicking it will generate the SHA1 key.
like image 3
Sandeep Avatar answered Oct 16 '22 14:10

Sandeep