Skip to content
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

fix multiple return error case; fix expire time unit issue #20

Merged
merged 2 commits into from
Mar 6, 2020

Conversation

plateaukao
Copy link
Member

No description provided.

@@ -21,7 +21,7 @@ data class AccessToken(
val accessToken = loginResult.lineCredential?.accessToken ?: return null
return AccessToken(
accessToken.tokenString,
accessToken.expiresInMillis,
(accessToken.estimatedExpirationTimeMillis - System.currentTimeMillis()) / 1000,
lineIdTokenString
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To algin the documentation and iOS implementation, please return the expires_in which we received from server when issuing the token. (The number is fixed and counted from when the server issued the token).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is another explanation on how to use these expires_in values. Basically, we just provide what received from the server as a simple relaying, and leave the framework users to determine how they would want to use or store them.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay!

)
loginResult?.error(resultCode.toString(), "login failed", null)
loginResult = null
return true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@tsairene tsairene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@onevcat onevcat merged commit a5b03a2 into line:master Mar 6, 2020
@plateaukao plateaukao deleted the fix_expire_time_issue branch May 11, 2020 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants