Conversation
<meta-data
android:name="google_server_client_id"
android:value="value />
need to add this in your project manifest
added requestIdToken
added idToken integration info
|
@nowfalsalahudeen looks very good, but I'll make some comments about a few changes to make your code more aligned with the rest. Also, could you change the base branch from |
| } | ||
| } | ||
| ``` | ||
| add google_cerver_client meta-data in application tag on your manifest file to get idToken for backend authentication |
There was a problem hiding this comment.
Right above this line, you can see the manifest placeholders I have created for any values that need to be in the manifest. With this google_server_client_id, we should take the same approach, both for ease of use and consistency.
See the above placeholder and follow the same approach. After that, the end user would just need to add another placeholder in their build file.
|
|
||
| ) : RoguinEndpoint { | ||
|
|
||
| private var myApiKey: String? = null |
There was a problem hiding this comment.
You should remove this as it is only used internally in the initialization of the googleClient. A local variable is sufficient.
There was a problem hiding this comment.
coz the local variable not accessibleout site try-catch block. thats y i declared that in globally
| val bundle = ai.metaData | ||
| myApiKey = bundle.getString("google_server_client_id") | ||
| } catch (e: Exception) { | ||
| Log.e( |
There was a problem hiding this comment.
You should wrap this log around a safe block for debug builds, like it is done on the TwitterEndpoint.
There was a problem hiding this comment.
yep.will follow the same method as your code
|
|
||
| val options = GoogleSignInOptions | ||
| .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) | ||
| .requestIdToken(myApiKey) |
There was a problem hiding this comment.
Will this cause a problem on NULL apiKeys?
iFanie
left a comment
There was a problem hiding this comment.
This is good solution that escaped my initial implementation. After we resolve the comments I added, it will definitely be included in the next release.
yep will try to change soon. But the problem is am the very first to use pull request and branching mechanism of github.Iam a gitlab user. I have only very basic idea. will try to learn and something do more |
added requestIdToken on google oAuth client for backent google authentication