File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,10 @@ Use user in your fiber app
7474func Handler (ctx *fiber .Ctx ) error {
7575 // Get user stored in context
7676 // Default: user
77- ctx.Locals (" user" )
77+ currentUser := ctx.Locals (" user" ).(gofiberfirebaseauth.User )
78+ fmt.Println (currentUser)
79+ fmt.Println (currentUser.Email )
80+
7881}
7982```
8083
@@ -97,17 +100,6 @@ All available configuration
97100You ** must** provide already initialized ` FirebaseApp ` app.
98101You cannot initialize two firebase apps.
99102
100- This package adds the ` user ` object returned by firebase to context key ` user ` . You can use that inside your functions.
101- (you have option to configure the ContextKey. Check the configuration table above )
102-
103- user object type
104- ```
105- type user struct{
106- emailVerified bool
107- userID, email string
108- }
109- ```
110-
111103 #### Note3
112104 Ignore url accept array of string. URl format should follow below format\
113105 ` {METHOD}::/{url} ` \
You can’t perform that action at this time.
0 commit comments