mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-19 17:14:57 +00:00
Added fallback for JWT token
This commit is contained in:
parent
191c1681c7
commit
4841aff4f4
@ -25,6 +25,7 @@ import { AuthService } from './auth.service';
|
||||
import { RedirectAuthService } from './redirect-auth.service';
|
||||
import { AuthenticationConfirmationComponent } from './view/authentication-confirmation/authentication-confirmation.component';
|
||||
import { JWT_STORAGE_SERVICE } from '../services/jwt-helper.service';
|
||||
import { StorageService } from 'public-api';
|
||||
|
||||
/**
|
||||
* Create a Login Factory function
|
||||
@ -40,7 +41,7 @@ export function loginFactory(redirectService: RedirectAuthService): () => Promis
|
||||
* @returns current instance of OAuthStorage
|
||||
*/
|
||||
export function oauthStorageFactory(): OAuthStorage {
|
||||
return inject(JWT_STORAGE_SERVICE);
|
||||
return inject(JWT_STORAGE_SERVICE) ?? inject(StorageService);
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
|
Loading…
x
Reference in New Issue
Block a user