mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 23:12:26 -06:00 
			
		
		
		
	
		
			
	
	
		
			18 lines
		
	
	
	
		
			330 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
	
		
			330 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package auth
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"github.com/gin-contrib/sessions"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func (m *Module) clearSession(s sessions.Session) {
							 | 
						||
| 
								 | 
							
									s.Clear()
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									// newOptions := router.SessionOptions(m.config)
							 | 
						||
| 
								 | 
							
									// newOptions.MaxAge = -1 // instruct browser to delete cookie immediately
							 | 
						||
| 
								 | 
							
									// s.Options(newOptions)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									if err := s.Save(); err != nil {
							 | 
						||
| 
								 | 
							
										panic(err)
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 |