Skip to content

Some improves for vk.com#21

Open
denizzzka wants to merge 6 commits intothaven:masterfrom
denizzzka:some_improve_for_vk
Open

Some improves for vk.com#21
denizzzka wants to merge 6 commits intothaven:masterfrom
denizzzka:some_improve_for_vk

Conversation

@denizzzka
Copy link
Contributor

@denizzzka denizzzka commented Sep 13, 2020

Adds:

  • response_type=token
  • Ability to pass custom parameters to .clientSession call
  • Ability to construct session from external token data

This is need to allow interop with VK.com

@thaven
Copy link
Owner

thaven commented Sep 18, 2020

@denizzzka thanks for your contributions. I merged the dependency updates. I'll get back to this one later.

// the authorization code may be exchanged for an access token.
reqParams["response_type"] = "code";
reqParams["response_type"] =
(provider.options & OAuthProvider.Option.tokenResponseType) ? "token" : "code";
Copy link
Owner

Choose a reason for hiding this comment

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

This looks like you're trying to use the OAuth2 implicit flow, which was excluded from this library because it is meant to be used by in-browser apps only, and D is not a language used to created such apps.

Please see the instructions for VK on https://vk.com/dev/authcode_flow_user

Copy link
Contributor Author

@denizzzka denizzzka Sep 27, 2020

Choose a reason for hiding this comment

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

No, I use it for auth of vk parsing tool logged as user. Tool generates URL, user clicks to it and then copy and pastes token response URL from browser into this tool.

This is official recommened way to authorize VK API user.

@denizzzka
Copy link
Contributor Author

Any news about this PR?

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.

2 participants