-
Notifications
You must be signed in to change notification settings - Fork 97
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
Support for stateless refresh token and new openapi definition. #42
Support for stateless refresh token and new openapi definition. #42
Conversation
My friend's twitter account @chinanws22 was wrongfully suspended as he is
not a bot, neither was he spamming. Please reinstate his account
في الأحد، ١٨ ديسمبر ٢٠٢٢ ٣:٠٩ م Robert Koch ***@***.***> كتب:
… ***@***.**** approved this pull request.
—
Reply to this email directly, view it on GitHub
<#42 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2PT4FWSDPCMA3CTEMVBKGTWN35IDANCNFSM6AAAAAAQXK3EDE>
.
You are receiving this because you are subscribed to this thread.Message
ID: <twitterdev/twitter-api-typescript-sdk/pull/42/review/1222009503@
github.com>
|
@danforero I opened your PR in my fork kochie#1 |
My friend's twitter account @chinanws22 was wrongfully suspended as he is
not a bot, neither was he spamming. Please reinstate his account
في الاثنين، ١٩ ديسمبر ٢٠٢٢ ٦:٥٨ ص Robert Koch ***@***.***>
كتب:
… @danforero <https://github.com/danforero> I opened your PR in my fork
kochie#1 <kochie#1>
—
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2PT4FXQOXB7LZ523WIGGO3WN7MPVANCNFSM6AAAAAAQXK3EDE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
My only dream in 2022 was to get my suspended account back before 2023, but
it hasn't come true yet
في الاثنين، ١٩ ديسمبر ٢٠٢٢ ٧:٠١ ص منير الدبعي ***@***.***> كتب:
… My friend's twitter account @chinanws22 was wrongfully suspended as he is
not a bot, neither was he spamming. Please reinstate his account
في الاثنين، ١٩ ديسمبر ٢٠٢٢ ٦:٥٨ ص Robert Koch ***@***.***>
كتب:
> @danforero <https://github.com/danforero> I opened your PR in my fork
> kochie#1 <kochie#1>
>
> —
> Reply to this email directly, view it on GitHub
> <#42 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/A2PT4FXQOXB7LZ523WIGGO3WN7MPVANCNFSM6AAAAAAQXK3EDE>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
I suffer from epilepsy. Please help me recover my account. If you do not
have the authority to recover the account, please send this message to
someone who can help me recover the account. I do not want to go to the
hospital because of my loss of the account. There is a chronic headache due
to illness and thinking about the account. Please help me. I will pray to
you.
@Chinanws22
في الاثنين، ٢ يناير ٢٠٢٣ ٢:١٧ ص منير الدبعي ***@***.***> كتب:
… My only dream in 2022 was to get my suspended account back before 2023,
but it hasn't come true yet
في الاثنين، ١٩ ديسمبر ٢٠٢٢ ٧:٠١ ص منير الدبعي ***@***.***> كتب:
> My friend's twitter account @chinanws22 was wrongfully suspended as he is
> not a bot, neither was he spamming. Please reinstate his account
>
> في الاثنين، ١٩ ديسمبر ٢٠٢٢ ٦:٥٨ ص Robert Koch ***@***.***>
> كتب:
>
>> @danforero <https://github.com/danforero> I opened your PR in my fork
>> kochie#1 <kochie#1>
>>
>> —
>> Reply to this email directly, view it on GitHub
>> <#42 (comment)>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/A2PT4FXQOXB7LZ523WIGGO3WN7MPVANCNFSM6AAAAAAQXK3EDE>
>> .
>> You are receiving this because you commented.Message ID:
>> ***@***.***>
>>
>
|
|
I suffer from epilepsy. Please help me recover my account. If you do not
have the authority to recover the account, please send this message to
someone who can help me recover the account. I do not want to go to the
hospital because of my loss of the account. There is a chronic headache due
to illness and thinking about the account. Please help me. I will pray to
you
I suffer from epilepsy. Please help me recover my account. If you do not
have the authority to recover the account, please send this message to
someone who can help me recover the account. I do not want to go to the
hospital because of my loss of the account. There is a chronic headache due
to illness and thinking about the account. Please help me. I will pray to
you
في الأحد، ٢٩ يناير ٢٠٢٣ ٣:٤٢ ص مسريها ***@***.***> كتب:
… Problem
There is no way to refresh the token when this is read from a database
(offline.access) there is a way to set the stored token in the client but
the refresh token function does not send the code verification parameter.
Solution
I added two optional parameters to the OAuth2User constructor, also
code_verifier is added as a class property.
generateUrlOptions: its type is GenerateAuthUrlOptions, if used it
generates code_verifier.
token: its type is Token, it can be used with a token read from a database.
Token type is exported to be used outside of the client.
This PR also includes a test for this feature
/examples/oauth2-offline_pkce_s256.ts, this example uses ../dist instead of
the npm twitter library because this feature is not included yet in npm
Result
You will be able to create a client using a stored token for offline
access.
—
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2PT4FUUUQ62TTNPLXG5EX3WUW4GRANCNFSM6AAAAAAQXK3EDE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Twitter API v2 seems to have several problems with Tokens expiring before time, it's being almost a year and the problem is still there: It looks like twitter API v2 development is abandoned, I'm, closing this PR. |
Problem
There is no way to refresh the token when this is read from a database (offline.access) there is a way to set the stored token in the client but the refresh token function does not send the code verification parameter.
Solution
I added two optional parameters to the OAuth2User constructor, also code_verifier is added as a class property.
generateUrlOptions: its type is GenerateAuthUrlOptions, if used it generates code_verifier.
token: its type is Token, it can be used with a token read from a database.
Token type is exported to be used outside of the client.
This PR also includes a test for this feature /examples/oauth2-offline_pkce_s256.ts, this example uses ../dist instead of the npm twitter library because this feature is not included yet in npm
Result
You will be able to create a client using a stored token for offline access.