-
Notifications
You must be signed in to change notification settings - Fork 407
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
add oauth verify api #291
add oauth verify api #291
Conversation
lib/client.ts
Outdated
@@ -679,6 +679,24 @@ export class OAuth { | |||
return this.http.postForm(`${OAUTH_BASE_PREFIX}/revoke`, { access_token }); | |||
} | |||
|
|||
public verifyAccessToken(access_token: string): Promise<{}> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's response why {}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just referenced revokeAccesstoken API method.
What do you want to return value?
Do it expect expires_in?
lib/client.ts
Outdated
client_id: string, | ||
nonce: string = undefined, | ||
user_id: string = undefined, | ||
): Promise<{}> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here
#### `revokeAccessToken(access_token: string): Promise<{}>` | ||
|
||
It corresponds to the [Revoke channel access token](https://developers.line.biz/en/reference/messaging-api/#revoke-channel-access-token) API. | ||
It corresponds to the [Revoke channel access token](https://developers.line.biz/en/reference/line-login/#revoke-access-token) API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I think we should follow the original API since we are building public sdk
so we need to provide the response type as the document.
…On Fri, Aug 6, 2021 at 15:05 koichi uchinishi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In lib/client.ts
<#291 (comment)>
:
> @@ -679,6 +679,24 @@ export class OAuth {
return this.http.postForm(`${OAUTH_BASE_PREFIX}/revoke`, { access_token });
}
+ public verifyAccessToken(access_token: string): Promise<{}> {
I referenced revokeAccesstoken API method.
What do you want to return value?
Do it expect expires_in?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#291 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBFVO35XFWDXOUAECZKEXLT3N3SVANCNFSM5A6KKXXA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
af4703e
to
16cd529
Compare
lib/client.ts
Outdated
public verifyIdToken( | ||
id_token: string, | ||
client_id: string, | ||
nonce: string = undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe just nonce?: string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@4geru sann
Would you please change it to
nonce?: string,
user_id?: string
16cd529
to
67076ce
Compare
@xingoxu Sorry for the delay. nonce and user_id are now supported. Please review again. |
docs/api-reference/oauth.md
Outdated
@@ -21,7 +22,13 @@ class OAuth { | |||
client_id: string, | |||
client_secret: string, | |||
access_token: string, | |||
): Promise<{}> | |||
): Promise<Types.VerifyAccessToken> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Types.VerifyAccessToken
maybe wrong places?
docs/api-reference/oauth.md
Outdated
@@ -66,9 +73,19 @@ It corresponds to the [Issue channel access token](https://developers.line.biz/e | |||
const { access_token, expires_in, token_type } = await oauth.issueAccessToken("client_id", "client_secret"); | |||
``` | |||
|
|||
|
|||
#### `verifyAccessToken(access_token: string): Promise<{}>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#### `verifyAccessToken(access_token: string): Promise<{}>` | |
#### `verifyAccessToken(access_token: string): Promise<Types.VerifyAccessToken>` |
67076ce
to
800acf6
Compare
Thank you very much! |
@xingoxu thank you for the review. |
add verify api.
https://developers.line.biz/en/reference/line-login/#oauth
i'd like to check verify liff access token, and revoke.