Hi, I’m new to the IAM system so please forgive my naive questions. I have been looking for an alternative to keycloak for my php application as there is no official documentation for php on the keycloak website/forum. Does okta support and maintain technical documentation for php applications? The tutorial was really useful and It worked at my end.However when I logout and login again, it connects me directly without redirecting me to the okta login page and without asking for my credentials. How can I correct this please? Also, in production mode, my application is accessed from a permanent url. How can I redirect my users to the okta login page without having to start my application with php - S 127.0.0.1:8080 each time? Finally, for now, can users login with their outlook credentials? Thanks for all your time.
After google around I found that things like first name and if the email address is verified (which I meant with above) can be seen on userinfo endpoint. Can you explain a bit more how to get the fields in userinfo back? Thank you.
You’ll need to do two things. First, make sure you request the “profile” and “email” scopes in the request. Then when you get an access token, you can look up the user’s profile info at the userinfo endpoint by making a POST request with the access token. Then you’ll get back data like this:
Hi I followed the instruction and able to setup the application. I have specific requirement 1. User log in to Okta account 2. Clicks on the assigned PHP app 3. User redirected to app and directly gets login.
I did not get any token when user clicks on app in okta and redirected to custom app.
Hi. Is this article old? I have created the application but unable to find the client ID and secret. And even the UI you have suggested seems older to me? Please guide me how to configure using developer account?
Yes. You can see from the date at the top that it was published in July 2018. We just made a number of UI changes, but you should still be able to see the client ID and secret after creating an app. Do you see an Applications menu in the left nav? If so, you should be able to click on it and see Applications > Add Application.
Hi Aaron, i have this one page app setup. What would the code routine look like to pull the userinfo endopoint and then interate through all of the returned values?
Can you try setting the $metadata_url to https://{$org}.okta.com/oauth2/{$authorizationServerId}/.well-known/openid-configuration instead of https://{$org}.okta.com/oauth2/{$authorizationServerId}/.well-known/oauth-authorization-server?
If $metadata is null at this point it means you didn’t configure the issuer URL correctly. Double check that you’ve copied the URL exactly from your Okta dashboard.
Okay then in that case can you post the exact error message you’re getting? And if you made any changes to the code, share the code somewhere too (make sure to blank out any confidential information such as the client secret first)