All Projects → oktadev → okta-ionic-auth-example

oktadev / okta-ionic-auth-example

Licence: Apache-2.0 license
Example showing Ionic Authentication with Okta

Programming Languages

typescript
32286 projects
HTML
75241 projects
SCSS
7915 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to okta-ionic-auth-example

schematics
Schematics for adding Okta Auth to your projects
Stars: ✭ 60 (+160.87%)
Mutual labels:  ionic, oidc, okta
okta-jhipster-microservices-oauth-example
A microservices architecture built with JHipster, OAuth 2.0, and Okta
Stars: ✭ 29 (+26.09%)
Mutual labels:  oidc, okta
okta-spring-security-5-example
Authentication with Spring Security 5 and Okta OIDC
Stars: ✭ 16 (-30.43%)
Mutual labels:  oidc, okta
omniauth-okta
OAuth2 strategy for Okta
Stars: ✭ 29 (+26.09%)
Mutual labels:  okta
IdentityServer4.PhoneNumberAuth
Sample passwordless phone number authentication using OAuth in ASP.NET Core 2.2
Stars: ✭ 83 (+260.87%)
Mutual labels:  oidc
cap
A collection of authentication Go packages related to OIDC, JWKs and Distributed Claims.
Stars: ✭ 328 (+1326.09%)
Mutual labels:  oidc
Mobile.UP
Mobile.UP
Stars: ✭ 13 (-43.48%)
Mutual labels:  ionic
ionic-vue-mobile-template-03
Hybrid app template built with vue, ionic and capacitor.
Stars: ✭ 62 (+169.57%)
Mutual labels:  ionic
ionic4-ngrx-firebase
A basic application for Ionic 4 with firebase & ngrx actions, reducers and effects
Stars: ✭ 17 (-26.09%)
Mutual labels:  ionic
v-cupertino
A Vue 3 Wrapper for Cupertino Pane Library
Stars: ✭ 17 (-26.09%)
Mutual labels:  ionic
workos-node
Official Node SDK for interacting with the WorkOS API
Stars: ✭ 42 (+82.61%)
Mutual labels:  okta
mock-oauth2-server
A scriptable/customizable web server for testing HTTP clients using OAuth2/OpenID Connect or applications with a dependency to a running OAuth2 server (i.e. APIs requiring signed JWTs from a known issuer)
Stars: ✭ 83 (+260.87%)
Mutual labels:  oidc
eks
AWS EKS - kubernetes project
Stars: ✭ 149 (+547.83%)
Mutual labels:  oidc
ionic-uuchat
基于ionic3,angular4的实时聊天app,兼容web端。该项目只是前端部分,所有数据需要请求后端服务器,需要配套express-uuchat-api使用。
Stars: ✭ 14 (-39.13%)
Mutual labels:  ionic
travis-ci-ionic-yml
An example configuration of Ionic/cordova + NPM + AngularJS + Android continuous integration setup on Travis CI
Stars: ✭ 21 (-8.7%)
Mutual labels:  ionic
flaskoidc
A wrapper of Flask with pre-configured OIDC support
Stars: ✭ 33 (+43.48%)
Mutual labels:  oidc
okta-kotlin-typescript-notes-example
Kotlin and TypeScript! 🎉
Stars: ✭ 14 (-39.13%)
Mutual labels:  okta
ionic-3-video-calling-using-webrtc
This is demo code of how to implement video calling in ionic 3 using webrtc
Stars: ✭ 58 (+152.17%)
Mutual labels:  ionic
ionic-image-upload
Ionic Plugin for Uploading Images to Amazon S3
Stars: ✭ 26 (+13.04%)
Mutual labels:  ionic
bitpocket-mobile-app
Mobile app for accepting bitcoin payments at the point of sale (Bitcoin POS).
Stars: ✭ 26 (+13.04%)
Mutual labels:  ionic

Ionic App with Okta Authentication

This is an old example. Please see Ionic + Sign in with Apple and Google for an updated version.

This example shows how to create an Ionic application that uses Cordova's in-app browser to log in with Okta.

Please read Build an Ionic App with User Authentication to see how this application was created.

Prerequisites: Node.js.

Okta has Authentication and User Management APIs that reduce development time with instant-on, scalable user infrastructure. Okta's intuitive API and expert support make it easy for developers to authenticate, manage, and secure users and roles in any application.

Getting Started

To install this example application, run the following commands:

git clone https://github.com/oktadeveloper/okta-ionic-auth-example.git
cd okta-ionic-auth-example

This will get a copy of the project installed locally. Then run the following command to install Ionic and Cordova.

npm install -g cordova ionic

Then run the application:

npm install
ionic serve

To integrate Okta's Identity Platform for user authentication, you'll first need to:

  • Register and create an OIDC application
  • Log in to your Okta account and navigate to Applications > Add Application
  • Select SPA and click Next
  • Give your application a name (e.g. "Ionic OIDC")
  • Change the Base URI and Login redirect URI to http://localhost:8100 and click Done.

After performing these steps, copy the clientId into src/pages/login/login.ts and change {yourOktaDomain} to match your account's id.

constructor(private navCtrl: NavController, private oauthService: OAuthService) {
  oauthService.redirectUri = 'http://localhost:8100';
  oauthService.clientId = '{clientId}';
  oauthService.scope = 'openid profile email';
  oauthService.issuer = 'https://{youtOktaDomain}.com/oauth2/default';
  oauthService.tokenValidationHandler = new JwksValidationHandler();
  ...
}

Your OIDC app should have settings like the following:

Okta OIDC Settings

Links

This example uses the following libraries provided by Okta:

It also uses the following library provided by Manfred Steyer:

Help

Please post any questions as comments on the blog post, or visit our Okta Developer Forums. You can also email [email protected] if would like to create a support ticket.

License

Apache 2.0, see LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].