Implicite flow okta 400 error

hi team,
I integrate okta in my projet, its work very good in localhost:4200, but when I build my project angular ng build --prod --base-href /liris/ --deploy-url /liris/ , I have a folder in dist , when I put my folder tomcat , and I change conf okta
http://localhost:8080/liris/authSuccess instead of http://localhost:4200/authSuccess I end up with error 400 page of okta ,

const oktaConfig= {
issuer: ‘’,
redirectUri: window.location.origin.concat(’/authSuccess’),
clientId: ‘0oabot6zqATvLRsRO4x6’,
scope: ‘openid email’

entryComponents: [TimeOutModalComponent],
providers: [{provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true},
{provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true},
{provide: LOCALE_ID, useValue: ‘fr’},
{ provide: OKTA_CONFIG, useValue: oktaConfig },
{provide: ErrorHandler, useClass: GlobalErrorHandler}],
bootstrap: [AppComponent]

can you help me

Look at the address bar when you see the 400 error. The redirect URI it’s trying to go to will be a parameter in the URL. If you add that value in your app’s login redirect URI’s, it’ll work.

in my address bar i’have
in my conf okta

what should I add ?

If you look at the parameter, it says to use.


If you want to use the one you already have configured, you need to add the context path in your Angular app.

yes when i build my angular i use ng build --prod --base-href /liris/ --deploy-url /liris/

I did another test ,I added the dist in a spring boot project with the context / liris but the same error message 400

“scripts”: {
“ng”: “ng”,
“start”: “ng serve”,
“build”: “ng build --prod --base-href /liris/ --deploy-url /liris/”,
“test”: “ng test”,
“lint”: “ng lint”,
“e2e”: “ng e2e”

yes it’s working redirectUri: window.location.origin.concat(’/liris/authSuccess’),
thank very much matt