https://github.com/pushpabrol/auth0webauth
https://github.com/pushpabrol/auth0webauth
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pushpabrol/auth0webauth
- Owner: pushpabrol
- Created: 2016-11-04T17:22:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-06T04:17:20.000Z (over 9 years ago)
- Last Synced: 2025-01-19T04:34:11.113Z (over 1 year ago)
- Language: Swift
- Size: 125 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Auth0WebAuth
- A project using Auth0.swift to show Login via an iOS app and generating both access_token and refresh_token for sign in and calling an API
## How it works
- User signs in using this App which uses a auth0 SDK that launches the login within a web view. The user authenticates with the `audience=Identifier_for_API as defined within Auth0` and the `scope = openid profile offline_access api:scopes` where api:scopes represents the set of scopes the user will consent to allow the App to present to the API.
### Please read the note below before setting up the Client App within Auth0
- Create a Client within Auth0 and see the link -> https://github.com/auth0/Auth0.swift#web-based-auth-ios-only to set the settings based on your iOS App
### Please read the note below before setting up the API within Auth0
- Make sure while defining the API within Auth0 the toggle for allow offline access is enabled. make sure when creating the API you have defined the Signing algorithm as RS256 and make a note of the identifier for the API within Auth0. This identifier will be used as the API_AUDIENCE in the settings below
- The required settings are created within Auth0.plist
```
Domain
{your_auth0_domain}
ClientId
{your_auth0_clientId}
API_AUDIENCE
{your_API_Identifier as defined in Auth0}
scope
openid profile offline_access api:scopes
```
- The endpoint of the API is defined under Info.plist and is assumed to be http://localhost:3001 - The project for the API is under https://github.com/pushpabrol/nodejs-api-rs