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

add paramater to OAuth2CodeGrant not working #344

Open
fukemy opened this issue Jun 2, 2020 · 3 comments
Open

add paramater to OAuth2CodeGrant not working #344

fukemy opened this issue Jun 2, 2020 · 3 comments

Comments

@fukemy
Copy link

fukemy commented Jun 2, 2020

Hi, thanks for your lib, im tried to use but not working, here is example

let oauth2 = OAuth2CodeGrant(settings: [
"client_id": "",
"client_secret": "secret",
"response_type": "code token",
"grant_type": "hybrid",
"nonce": UUID.init().uuidString.replacingOccurrences(of: "/-/g", with: ""),
"authorize_uri": "
",
"token_uri": "", // code grant only
"redirect_uris": ["
://"], // register your own "myapp" scheme in Info.plist
"scope": "openid profile vxlink email",
"secret_in_body": true, // Github needs this
"keychain": false, // if you DON'T want keychain integration
] as OAuth2JSON)

But when i see the final url, the response_type always is "code", and "nonce" did not show.

So i tried to edit your lib(edit "response_type" and add "nonce" when generated url) -> It's working.
Hmmm, i have the bad ideal, that mean copy your lib into my project, but i got error "No such... SwiftKeychan", after a lot of searching i knew it's submodule, but i can find it in my project, So can you help me know how to solve this?

  1. As the best solution is make config contain "response_type" and "nonce".
  2. Find the submodule and paste to my project.

Sorry for my bad English

@motionapps
Copy link

Hey, did you find a solution for this?

The reason response_type is always "code" is probably cause it does not accept spaces... and nonce cause it does not seem to accept custom strings? At least the wont show up in the object

@fukemy
Copy link
Author

fukemy commented Feb 18, 2021

hi buddy, better using AppAuth

@motionapps
Copy link

Hi,

thanks for the tip! Will try it out!

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

No branches or pull requests

2 participants