File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
Tests/OAuthKitTests/Resources Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ Although OAuthKit will automatically try to load the `oauth.json` file found ins
134134## OAuth Providers
135135* [ Github] ( https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps )
136136* [ Google] ( https://developers.google.com/identity/protocols/oauth2 )
137+ * **Important**: When creating a Google OAuth2 application from the [Google API Console](https://console.developers.google.com/) create an OAuth 2.0 Client type of Web Application (not iOS).
137138* [ Instagram] ( https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-access-tokens-and-permissions )
138139* [ Microsoft] ( https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow )
139140* [ Slack] ( https://api.slack.com/authentication/oauth-v2 )
Original file line number Diff line number Diff line change @@ -406,6 +406,7 @@ public extension OAuth {
406406 queryItems. append ( URLQueryItem ( name: " client_secret " , value: provider. clientSecret) )
407407 queryItems. append ( URLQueryItem ( name: " code " , value: code) )
408408 queryItems. append ( URLQueryItem ( name: " redirect_uri " , value: provider. redirectURI) )
409+ queryItems. append ( URLQueryItem ( name: " grant_type " , value: " authorization_code " ) )
409410 urlComponents. queryItems = queryItems
410411 guard let url = urlComponents. url else {
411412 publish ( state: . empty)
Original file line number Diff line number Diff line change 1111 " user" ,
1212 " repo"
1313 ]
14+ },
15+ {
16+ "id" : " Google" ,
17+ "authorizationURL" : " https://accounts.google.com/o/oauth2/v2/auth" ,
18+ "accessTokenURL" : " https://oauth2.googleapis.com/token" ,
19+ "clientID" : " CLIENT_ID" ,
20+ "clientSecret" : " CLIENT_SECRET" ,
21+ "redirectURI" : " https://github.com/codefiesta/" ,
22+ "scope" : [
23+ " https://www.googleapis.com/auth/userinfo.email" ,
24+ " https://www.googleapis.com/auth/userinfo.profile" ,
25+ " openid"
26+ ]
1427 }
28+
1529]
You can’t perform that action at this time.
0 commit comments