Automattic / Gravatar-SDK-iOS

Gravatar SDK is a Swift library that allows you to integrate Gravatar features into your own iOS applications.
https://gravatar.com
Mozilla Public License 2.0
52 stars 5 forks source link

Start using the “token” response type in OAuth flow #421

Closed pinarol closed 1 month ago

pinarol commented 1 month ago

we are still using the “code” response type for oauth flow, we need to use "token" and make any adjustments to the code where necessary. To be able to test this we need to use the wpcom-local-dev custom schema in the redirectURI defined in the Secrets.swift. Something like:

static let redirectURI: String = "wpcom-local-dev://authorization-callback"

Normally, the BE doesn't allow us to use token endpoint with a custom schema but wpcom-local-dev is a special schema that's white listed at the backend for testing purposes.

If I recall right, we might need a code change for parsing the access token from the redirect url after switching to "token".