angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

Where to find auth guard in the version 7

Open bingjie2680 opened this issue 5 years ago • 4 comments

I have been using the auth-guard in version 6. Now I have upgrade to version 7 with modular setup. But I can't seem to find the auth-guard in the modular bundle. It is available in the compact bundle, but I assume that we should not use the one from compact bundle, that would not take advantage of the tree shacking. So there is no replacement and we should just write our own guard?

bingjie2680 avatar Oct 01 '21 19:10 bingjie2680

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Oct 01 '21 19:10 google-oss-bot

Modular does not have an auth guard yet, aiming to get this into 7.1

jamesdaniels avatar Oct 04 '21 20:10 jamesdaniels

You can currently import it like that: import {AuthGuard} from '@angular/fire/auth-guard';

waterplea avatar Oct 28 '21 11:10 waterplea

A modular auth guard is available: you can import it with import { AuthGuard } from '@angular/fire/auth-guard', as noted above.

Since that covers the modular replacement you were looking for, I'm closing this. If the auth guard is missing something you need on a current version, please open a new issue and we will follow up.

armando-navarro avatar Jul 23 '26 01:07 armando-navarro