Skip to content

lukeredpath/oauth-pkce-ios-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iOS OAuth with PKCE example client

This is a very small SwiftUI app that demonstrates how to authenticate using OAuth using the authorization code grant with PKCE.

It is designed to work with the proof-of-concept PKCE proxy server.

The example app does not use any third-party libraries. It:

  • Uses ASWebAuthenticationSession from the AuthenticationServices framework to allow the user to authenticate with a third-party service via the PKCE proxy and obtain the authorization grant code.
  • Uses CryptoKit to generate the PKCE code challenge.
  • Makes a simple POST request using URLSession to exchange the authentication code for an access token, again via the PKCE proxy.

This is not production-ready code and is simply a proof of concept.

About

A small example of how to use OAuth in a SwiftUI app with PKCE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages