NullInjectorError
asadakkhan opened this issue · comments
Checklist
- The issue can be reproduced in the auth0-spa-js sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the documentation and API documentation, and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
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.