auth0 / auth0-spa-js

Auth0 authentication for Single Page Applications (SPA) with PKCE

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NullInjectorError

asadakkhan opened this issue · comments

Checklist

Description

NullInjectorError: R3InjectorError(Standalone[LoginComponent])[AuthorizationService -> AuthorizationService -> AuthService -> InjectionToken auth0.client -> InjectionToken auth0.client]: NullInjectorError: No provider for InjectionToken auth0.client! I tried to give provider and other thing not working for me.

When I tried to write a test cases

Reproduction

NullInjectorError: No provider for InjectionToken auth0.client! I

Additional context

No response

auth0-spa-js version

2.1.2

Which framework are you using (React, Angular, Vue...)?

Angular

Framework version

16

Which browsers have you tested in?

Chrome

Thanks for reaching out. Are you using our spa SDK, or our angular SDK?

Incase of our angular SDK, it looks like you didnt properly configure it and i recommend following the docs (https://auth0.com/docs/quickstart/spa/angular). If there are still issues, please provide a reproduction so we can understand what is going wrong.

If you are using our SPA SDK, then we cant help you with how you register things, but i assume you are using our angular SDK (https://github.com/auth0/auth0-angular). In that case, please open an issue in our angular repository with a reproduction as mentioned above.