jaychang0917 / SimpleAuth

A easy to use social authentication android library. (Facebook, Google, Twitter, Instagram)
224 stars 51 forks source link

Issue with retrolambda and more #1

Closed sajorahasan closed 7 years ago

sajorahasan commented 7 years ago

Hi Jay, I'm fan of your work, previously i was using your SocialLogin Library but as now it is depreciated, I have decided to move on to your new SimpleAuth Library which is great but i face some issues: 1) I was receiving wrong Api key error in Facebook as library automatically add 0 at the end of api key, so i dig deeper and found out that you have added "0" in manifest file <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="${facebookAppId}\0" /> So, I import your library as module and make necessary changes and bang it start working.

2) Another issue arise when i try to minifying apk with retrolambda which hopefully also get sorted out with progaurd rules but now google login is not working but facebook is working fine.

Again, Thanks for this awesome library.

jaychang0917 commented 7 years ago

Hi @sajorahasan ,

  1. \0 doesn't means adding a zero at the end but treating the facebookAppId as a string. What's your error?
    1. can you show the error log pls?
sajorahasan commented 7 years ago

In minified release apk i don't get any error while signing in with google it just show pop up to select account and when i select the account nothing happens. Its work fine in debug apk.

jaychang0917 commented 7 years ago

Try to add an android oauth client and fill in the SHA1 of your release keystore in google api console.

sajorahasan commented 7 years ago

No it is not working, i just tried it.

jaychang0917 commented 7 years ago

Please make sure you use the client id of WEB application and package name is filled in.

sajorahasan commented 7 years ago

Oh i have used Android key. Can you please guide me what do i provide in Authorised JavaScript origins and Authorised redirect URIs In Web Application?

jaychang0917 commented 7 years ago

leave them empty, all you need are

  1. a WEB oauth client id, put this in app build.gradle
  2. create an Android oath client, fill in package name and SHA1
sajorahasan commented 7 years ago

Where should i put Oauth client Id?

jaychang0917 commented 7 years ago

app level build.gradle

sajorahasan commented 7 years ago

But there is only 1 field googleWebClientId , in here i put web client id now where should i put Oauth client id in build.gradle?

jaychang0917 commented 7 years ago

i don't quite get your meaning. Your web application oauth client id = googleWebClientId

sajorahasan commented 7 years ago

As you have told, I have created two OAuth client id, one using Web Application and other Android

now i have 2 client id, so which 1 i should put in googleWebClientId ?

jaychang0917 commented 7 years ago

Use Web Application client id, ignore android one

sajorahasan commented 7 years ago

Yes I have used that one only but still its not letting me login after selecting the google account

sajorahasan commented 7 years ago

Sorry my bad i forget to remove blank space at the end of client id in build gradle that'swhy it was getting wrong client id

sajorahasan commented 7 years ago

Thank you very much for the help Its working perfectly now!

jaychang0917 commented 7 years ago

great! you are welcome.