generated from nhcarrigan/template
feat: initial prototype works
I can log in and create a book! Woo!
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* @copyright 2026 NHCarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import { AuthService } from '../services/auth.service';
|
||||
import { catchError, of } from 'rxjs';
|
||||
|
||||
export function initializeAuth(authService: AuthService) {
|
||||
return () => authService.getCurrentUser().pipe(
|
||||
catchError(() => {
|
||||
// If not authenticated, that's okay - just continue
|
||||
return of(null);
|
||||
})
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user