Skip to content

Commit 10185ed

Browse files
author
Manuel Rauber
authored
Corrects how localStorage could be used
You can not provide `localStorage` directly via `useValue`, you need to have a factory for that.
1 parent 0274cf5 commit 10185ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

projects/lib/src/oauth-service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ export class OAuthService extends AuthConfig {
354354
/**
355355
* DEPRECATED. Use a provider for OAuthStorage instead:
356356
*
357-
* { provide: OAuthStorage, useValue: localStorage }
357+
*
358+
* { provide: OAuthStorage, useFactory: oAuthStorageFactory }
359+
* export function oAuthStorageFactory(): OAuthStorage { return localStorage; }
358360
*
359361
* Sets a custom storage used to store the received
360362
* tokens on client side. By default, the browser's

0 commit comments

Comments
 (0)