mirror of
				https://github.com/Dan6erbond/sk-auth.git
				synced 2025-10-26 10:22:56 +01:00 
			
		
		
		
	✨ Add option to specify host in Auth config
				
					
				
			This commit is contained in:
		
							parent
							
								
									a748c345cb
								
							
						
					
					
						commit
						aea2f9d16e
					
				| @ -14,6 +14,7 @@ interface AuthConfig { | ||||
|   jwtSecret?: string; | ||||
|   jwtExpiresIn?: string | number; | ||||
|   host?: string; | ||||
|   protocol?: string; | ||||
|   basePath?: string; | ||||
| } | ||||
| 
 | ||||
| @ -70,7 +71,9 @@ export class Auth { | ||||
|   } | ||||
| 
 | ||||
|   getBaseUrl(host?: string) { | ||||
|     return this.config?.host ?? `http://${host}`; | ||||
|     const protocol = this.config?.protocol ?? "http"; | ||||
|     host = this.config?.host ?? host; | ||||
|     return `${protocol}://${host}`; | ||||
|   } | ||||
| 
 | ||||
|   getPath(path: string) { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user