Please read Ionic + Sign in with Apple and Google to read about how this app was created.
Prerequisites:
Clone this application to your local hard drive using Git.
git clone https://github.com/oktadeveloper/okta-ionic-social-login-example.git
Or use the GitHub CLI:
gh repo clone oktadeveloper/okta-ionic-social-login-example
Install this example's dependencies:
cd okta-ionic-social-login-example
npm i
You will need to create an OIDC Application in Okta to get your configuration settings to log in. You'll need to create an Okta developer account and register your app to get a client ID. Head on over to developer.okta.com/signup if you'd like to do this in your browser.
If you prefer the command line, install the Okta CLI. Run okta register
to sign up for a new account.
Log in to your Okta Developer account or use okta apps create
. If you use your browser, go to Applications > Add Application.
On the Create New Application page, select Native. Name your app Ionic Social
, and configure it as follows:
- Login redirect URIs:
http:https://localhost:8100/callback
com.okta.dev-133337:/callback
(wheredev-133337.okta.com
is your Okta Org URL)
- Logout redirect URIs:
http:https://localhost:8100/logout
com.okta.dev-133337:/logout
- Grant type allowed:
- Authorization Code
- Refresh Token
- Click Done
Run ionic serve
and open http:https://localhost:8100
in a new incognito window. Click Login to sign in to your Okta developer account.
This example uses the following open source libraries:
Please post any questions as issues in this forum, as questions on the blog post, or on Stack Overflow with an "okta" tag.
Apache 2.0, see LICENSE.