Use OpenID Connect Support with JHipster

Matt Raible

If you’re using the UAA feature that was part of JHipster 6, I think you can migrate to OAuth / OIDC. It should just be a matter of changing URIs in a config file. However, I’m not sure this will work since I’ve never tried switching between the two.

FWIW, UAA was dropped in JHipster 7 because there wasn’t anyone interested in maintaining it. See this issue for more information.

Hi @mraible,
How to convert from jwt/session based authentication to oauth2 without losing all the files (controller, services etc). By only changing authentication type and use Okta?

There’s no easy way to do this. However, if you check your project into source control, it’s not too difficult. Once you have everything checked into source control, remove all your files.

rm -rf *

The .yo-rc.json file and .jhipster directory will not be deleted by this command. Modify .yo-rc.json to use oauth2 for the authentication type. Then, run:

jhipster --with-entities

When it’s finished generating, use your IDE and roll back the files (controller, services, etc) that you changed. You can watch Convert JHipster from JWT Authentication to OAuth 2.0 / OIDC Authentication in 10 Minutes to see how this works.

1 Like