mirror of
				https://github.com/fastapi-users/fastapi-users.git
				synced 2025-11-04 06:37:51 +08:00 
			
		
		
		
	* Fix #68: use makefun to generate dynamic dependencies * Remove every Starlette imports * Split every routers and remove event handlers * Make users router optional * Pass after_update handler to get_users_router * Update documentation * Remove test file * Write migration doc for splitted routers
		
			
				
	
	
	
		
			707 B
		
	
	
	
	
	
	
	
			
		
		
	
	
			707 B
		
	
	
	
	
	
	
	
Authentication
FastAPI Users allows you to plug in several authentication methods.
How it works?
You can have several authentication methods, e.g. a cookie authentication for browser-based queries and a JWT token authentication for pure API queries.
When checking authentication, each method is run one after the other. The first method yielding a user wins. If no method yields a user, an HTTPException is raised.
For each backend, you'll be able to add a router with the corresponding /login and /logout (if applicable routes). More on this in the routers documentation.