# Cannot GET Implicit Callback for Angular 8

**URL:** <https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727>\
**Category:** Questions\
**Created:** [January 21, 2020, 2:53pm UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727 "2020-01-21T14:53:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ale](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@ale](https://devforum.okta.com/u/ale)\
**Post date:** [January 21, 2020, 2:53pm UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/1 "2020-01-21T14:53:10Z")

</div>

Hi, I have an Angular 8 application that I would like to use Okta to authenticate users. I created a developer account & console and the authentication works depend on how I start my application. When I said it works, I mean the application will redirect me to the Okta Sign-In dialog and return me back to the original starting point.

If I start my Angular application using this command “_ng serve --port 4200 -o_”, then the authentication worked flawlessly. However, if I use this command “_ng server --port 4200 -o -base-ref /myapp/_”, then I will get **Cannot GET /implicit/callback.**

I am relatively new to Angular and Okta; therefore, I am not clear what the issue is? Can you help?

Thank you.

---

<div class="post-metadata">

**Author:** ![mraible](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mraible/32/37_2.png) [@mraible](https://devforum.okta.com/u/mraible)\
**Post date:** [January 21, 2020, 2:59pm UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/2 "2020-01-21T14:59:34Z")

</div>

If you want to change the base href of your app, you’ll need to change the login redirect URI as well. Instead of using `http://localhost:4200/implicit/callback`, you’ll need to use `http://localhost:4200/<your-base-href>/implicit/callback`. You’ll also need to change the route for the `OktaCallbackComponent`:

```auto
const appRoutes: Routes = [
  {
    path: '<your-base-href>/implicit/callback',
    component: OktaCallbackComponent
  },
  ...
]

```

---

<div class="post-metadata">

**Author:** ![ale](https://avatars.discourse-cdn.com/v4/letter/a/f19dbf/32.png) [@ale](https://devforum.okta.com/u/ale)\
**Post date:** [January 21, 2020, 3:14pm UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/3 "2020-01-21T15:14:08Z")

</div>

I followed your instruction and it did not quite work. Perhaps, it is due to my lack of knowledge on the configuration. I included my configuration from the developer console and my client-side code below.

**Error**

 ![OktaDeveloperForumQuestionOnImplicitCallback-ErrorOutput](https://global.discourse-cdn.com/oktadev/original/2X/a/a7212ec28c6947d32a855572cc4fb246bfa5ea4a.png)

**Raw Text**

(upload://nQuPwF65KCmp6oo04KdqheZg2a6.png)  
ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: ‘implicit/callback’  
Error: Cannot match any routes. URL Segment: ‘implicit/callback’  
at ApplyRedirects.push…/node\_modules/@angular/router/fesm5/router.js.ApplyRedirects.noMatchError (router.js:2459)  
at CatchSubscriber.selector (router.js:2440)  
at CatchSubscriber.push…/node\_modules/rxjs/\_esm5/internal/operators/catchError.js.CatchSubscriber.error (catchError.js:34)  
at MapSubscriber.push…/node\_modules/rxjs/\_esm5/internal/Subscriber.js.Subscriber.\_error (Subscriber.js:79)  
at MapSubscriber.push…/node\_modules/rxjs/\_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:59)  
at MapSubscriber.push…/node\_modules/rxjs/\_esm5/internal/Subscriber.js.Subscriber.\_error (Subscriber.js:79)  
at MapSubscriber.push…/node\_modules/rxjs/\_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:59)  
at MapSubscriber.push…/node\_modules/rxjs/\_esm5/internal/Subscriber.js.Subscriber.\_error (Subscriber.js:79)  
at MapSubscriber.push…/node\_modules/rxjs/\_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:59)  
at ThrowIfEmptySubscriber.push…/node\_modules/rxjs/\_esm5/internal/Subscriber.js.Subscriber.\_error (Subscriber.js:79)  
at resolvePromise (zone.js:852)  
at resolvePromise (zone.js:809)  
at zone.js:913  
at ZoneDelegate.push…/node\_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)  
at Object.onInvokeTask (core.js:26246)  
at ZoneDelegate.push…/node\_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)  
at Zone.push…/node\_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)  
at drainMicroTaskQueue (zone.js:601)  
at ZoneTask.push…/node\_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)  
at invokeTask (zone.js:1693)

**Angular TypeScript**

```
const ISSUER = 'https://dev-xxxxx.okta.com/oauth2/default';
const CALLBACK_PATH = 'BusinessContinuity/implicit/callback';
const REDIRECT_URI = 'http://localhost:4200/BusinessContinuity/implicit/callback';
const CLIENT_ID = 'xxxxxxxxxxxxxxxx';

const config = {
  issuer: ISSUER,              
  redirectUri: REDIRECT_URI,   
  clientId: CLIENT_ID,
  scopes: ['openid', 'profile', 'email'],
  pkce: true
};

```

**Route**  
{  
path: CALLBACK\_PATH,  
component: OktaCallbackComponent  
}

**Developer Console Configuration**

 ![OktaDeveloperForumQuestionOnImplicitCallback](https://global.discourse-cdn.com/oktadev/original/2X/3/38755db9c7d94e6b1d794f9a7baa4abc4a3dbe8e.png)

---

<div class="post-metadata">

**Author:** ![mraible](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mraible/32/37_2.png) [@mraible](https://devforum.okta.com/u/mraible)\
**Post date:** [January 21, 2020, 11:58pm UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/4 "2020-01-21T23:58:59Z")

</div>

Maybe it’s easier to ask: why do you want to do this? It seems like you’re making things harder than they need to be, but I’m guessing you have a good reason for wanting to have a base-href that’s not the default.

---

<div class="post-metadata">

**Author:** ![oauthnewbie](https://avatars.discourse-cdn.com/v4/letter/o/ea666f/32.png) [@oauthnewbie](https://devforum.okta.com/u/oauthnewbie)\
**Post date:** [January 22, 2020, 1:53am UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/5 "2020-01-22T01:53:00Z")

</div>

I inherited this project from a previous developer and I don’t know what his rationale was for doing it either. Since I am so _ **new** _ to Angular, I did not question it.

The only difference is that the URL would read like this without the **base-ref** : _[http://localhost:4200/home](http://localhost:4200/home)_ instead of _[http://localhost:4200/base-ref/home](http://localhost:4200/base-ref/home)_.

I am curious if it has anything to do with IIS virtual directory or not.

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![naveen800](https://avatars.discourse-cdn.com/v4/letter/n/85e7bf/32.png) [@naveen800](https://devforum.okta.com/u/naveen800)\
**Post date:** [April 3, 2020, 3:29am UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/6 "2020-04-03T03:29:04Z")

</div>

Can you any help please, i’m having issues implicit/callback

I’m using Angular 8, OKTA and Apache httpd server. FYI I did updated .htaccess

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: ‘implicit/callback’  
Error: Cannot match any routes. URL Segment: ‘implicit/callback’  
at ar.noMatchError (main-es2015.2b92338aaa6db165e9da.js:1)  
at tt.selector (main-es2015.2b92338aaa6db165e9da.js:1)  
at tt.error (main-es2015.2b92338aaa6db165e9da.js:1)  
at l.\_error (main-es2015.2b92338aaa6db165e9da.js:1)  
at l.error (main-es2015.2b92338aaa6db165e9da.js:1)  
at l.\_error (main-es2015.2b92338aaa6db165e9da.js:1)  
at l.error (main-es2015.2b92338aaa6db165e9da.js:1)  
at l.\_error (main-es2015.2b92338aaa6db165e9da.js:1)  
at l.error (main-es2015.2b92338aaa6db165e9da.js:1)  
at Ue.\_error (main-es2015.2b92338aaa6db165e9da.js:1)  
at v (polyfills-es2015.5b10b8fd823b6392f1fd.js:1)  
at v (polyfills-es2015.5b10b8fd823b6392f1fd.js:1)  
at polyfills-es2015.5b10b8fd823b6392f1fd.js:1  
at a.invokeTask (polyfills-es2015.5b10b8fd823b6392f1fd.js:1)  
at Object.onInvokeTask (main-es2015.2b92338aaa6db165e9da.js:1)  
at a.invokeTask (polyfills-es2015.5b10b8fd823b6392f1fd.js:1)  
at s.runTask (polyfills-es2015.5b10b8fd823b6392f1fd.js:1)  
at \_ (polyfills-es2015.5b10b8fd823b6392f1fd.js:1)

---

<div class="post-metadata">

**Author:** ![tharun\_97](https://avatars.discourse-cdn.com/v4/letter/t/94ad74/32.png) [@tharun\_97](https://devforum.okta.com/u/tharun_97)\
**Post date:** [June 3, 2020, 6:33am UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/7 "2020-06-03T06:33:56Z")

</div>

hi naveen i am also facing same problem did you got any solution?

---

<div class="post-metadata">

**Author:** ![naveen800](https://avatars.discourse-cdn.com/v4/letter/n/85e7bf/32.png) [@naveen800](https://devforum.okta.com/u/naveen800)\
**Post date:** [June 3, 2020, 2:08pm UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/8 "2020-06-03T14:08:19Z")

</div>

@tharun_97

Issue resolved by following below link:

> [@Configuring the Angular router to \`useHash: true\` breaks \`OktaAuthService.loginRedirect\`](https://devforum.okta.com/t/configuring-the-angular-router-to-usehash-true-breaks-oktaauthservice-loginredirect/7374/3):
>
> We have the same issue, on a new Application. Issue was reported on December. Do we have any feedback on this issue? Any ideas for fixing the problem? Quit important as we need to move our existing App from Cognito AWS to OKTA, thus we need to find a solution. Thanks in advance for any feedback!

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 24, 2024, 7:58pm UTC](https://devforum.okta.com/t/cannot-get-implicit-callback-for-angular-8/7727/9 "2024-01-24T19:58:56Z")

</div>


