Filter by title

ABP OAuth Package

The authentication functionality has been moved from @abp/ng.core to @abp/ng.ouath since v7.0.

If your app is version 8.3 or higher, you should include "provideAbpOAuth()" after "provideAbpCore()" in the appConfig array of your app.config.ts.

Those abstractions can be found in the @abp/ng-core packages.

  • AuthService (the class that implements the IAuthService interface).
  • NAVIGATE_TO_MANAGE_PROFILE Inject token.
  • ApiInterceptor (the class that implements the IApiInterceptor interface).

Those base classes are overridden by the "AbpOAuthModule" for oAuth. There are also three functions provided with AbpOAuthModule.

  • PIPE_TO_LOGIN_FN_KEY a provide that calls a function when the user is not authenticated. The function should be PipeToLoginFn type.
  • SET_TOKEN_RESPONSE_TO_STORAGE_FN_KEY a provide that calls a function when the user is authenticated. The function should be SetTokenResponseToStorageFn type.
  • CHECK_AUTHENTICATION_STATE_FN_KEY a provide that calls a function when the user is authenticated and stores the auth state. The function should be CheckAuthenticationStateFn type. The tokens and interfaces are in the @abp/ng.core package but the implementation of these interfaces is in the @abp/ng.oauth package.

If you want to make your own authentication system, you must also change these 'abstract' classes.

ApiInterceptor is provided by @abp/ng.core but overridden with @abp/ng.oauth. The ApiInterceptor adds the token, accepted-language, and tenant id to the header of the HTTP request. It also calls the http-wait service.

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

ABP Community Talks
What’s new with .NET 10 & ABP 10?
20 Nov, 17:00
Online
Watch the Event
ABP Live Webinar
Webinar Calendar Webinar Calendar
Discover
ABP Platform
Register Now
Dec 10
Wednesday,
17:00 UTC
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.