Goal: make a basic Php app that's able to use the Okta service for authentication (authN).
Okta article: https://developer.okta.com/blog/2018/07/09/five-minute-php-app-auth
Steps:
- Go to https://developer.okta.com/ and sign in (create an account if needed)
- Applications > applications > Create app integration > choose OIDC > choose Web App > Next
- Name the app > set sign-in redirect URI: http://localhost:80/ (include the http and the trailing / char)
- Do the same for the sign-out redirect URI: http://localhost:80/
- Assignments > allow everyone in your org to access
- Copy the Client ID: 0oa6icqjxtDuNze4m5d7
- Copy the Client Secret: OdW3QV3L_o2RrEgXqVd6EQLfvt9KJtOkPGkCvWeY
- Make note of the Okta Org (in the URL of the Okta developer page: https://dev-96447452-admin.okta.com/)
- Modify the values for the client id, secret, and okta org in the index.php file
To run code:
- Run cmd:
docker-compose up
from the project repo - Go to:
http://localhost/:80
If you are getting errors, make sure that Docker is running on your local machine.