Ramesh
Ramesh

Reputation: 11

JHipster with OpenIDConnect Authentication

Do you have any example configuration for OpenIDConnect (Microsoft ADFS) configurations for JHipster generated application?

OKTA configuration is working fine, but pointing to Microsoft ADFS config is failing.

My Config:

security:
    basic:
        enabled: false
    oauth2:
        client:
            access-token-uri: https://<domain.com>/adfs/oauth2/token
            user-authorization-uri: https://<domain.com>/adfs/oauth2/authorize
            client-id: sada-sdasd-asds-adas
            client-secret: jhasdsadsasadasdsadsa          
            client-authentication-scheme: form
            scope: openid profile email
        resource:
            user-info-uri: https://<domain.com>/adfs/userinfo           
            prefer-token-info: false

Upvotes: 1

Views: 775

Answers (1)

Stelian Galmati
Stelian Galmati

Reputation: 61

I am currently working on this also. I get to the login screen but then have some problems when redirecting back to the JHipster app.

The steps you need to have (which I've also done and are working up to ...) are:

  1. Create a new application in the azure portal as described in registration here: https://learn.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-openid-connect-code
  2. In order to get the links you need, you need the tenant ID, which you can get following these steps: https://techcommunity.microsoft.com/t5/Office-365/How-do-you-find-the-tenant-ID/td-p/89018
  3. The authorize, token and userinfo links you get based on tenant id like this: https://login.microsoftonline.com/{your-tenant-id}/.well-known/openid-configuration

Hope it helps!

Upvotes: 2

Related Questions