Replies: 1 comment
-
| I suspect your  See https://docs.rs/actix-web/4/actix_web/middleware/#ordering | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://docs.rs/actix-identity/latest/actix_identity/
I implemented the login function and the function of checking user information in the handler according to the instructions in the document, but it is obviously unreasonable to check the user login status in each handler, so I want to add a middleware to check whether the user is logged in. I added the AuthMiddleware and completed the registration, but in the AuthMiddleware, I can't get the identify
Print log after calling the interface >> identity: None
rustc -V):actix-web = { version = "4.8.0" }
actix-session = { version = "0.9.0", features = ["redis-rs-session"] }
actix-identity = "0.7.1"
actix-settings = "0.7.1"
actix-service = "2.0.2"
Beta Was this translation helpful? Give feedback.
All reactions