- Notifications
You must be signed in to change notification settings - Fork40
oktadev/okta-spring-boot-login-options-example
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This repository shows how to create a plethora of login options for Spring Boot 2.1. Please readA Quick Guide to Spring Boot Login Options to see how this example was created.
Prerequisites:Java 8.
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.
To install this example, run the following commands:
git clone https://github.com/oktadeveloper/okta-spring-boot-login-options-example.gitcd okta-spring-boot-login-options-exampleThebasic-auth,custom-form-auth, andform-auth examples can all be run using:
./gradlew bootRunLook at the code or theblog post for the hard-coded credentials. The blog post also has instructions for configuring GitHub and Okta as identity providers.
To run theoauth-okta-starter example, you'll need to create an account and OIDC app on Okta.
Log in to your Okta Developer account (orsign up if you don’t have an account).
- From theApplications page, chooseAdd Application.
- On the Create New Application page, selectWeb.
- Give your app a memorable name, add
http://localhost:8080/login/oauth2/code/oktaas a Login redirect URI, then clickDone.
Copy your issuer (found underAPI >Authorization Servers), client ID, and client secret intooauth-okta-starter/src/main/resources/application.yml as follows:
okta:oauth2:issuer:https://{yourOktaDomain}/oauth2/defaultclient-id:{yourClientID}client-secret:{yourClientSecret}
NOTE: The value of{yourOktaDomain} should be something likedev-123456.okta.com. Make sure you don't include-admin in the value!
After modifying this file, start the example with./gradlew bootRun. You should be able to authenticate with Okta athttp://localhost:8080.
This example uses the following open source libraries:
Please post any questions as comments on theblog post, or on theOkta Developer Forums.
Apache 2.0, seeLICENSE.
About
Spring Boot Login Options
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Languages
- Java83.1%
- HTML13.4%
- CSS3.5%