feat(frontend): discord registration/login/linking
also moves the registration form found on the mastodon callback page into a component so we're not repeating the same code for every auth method
This commit is contained in:
		
							parent
							
								
									4780be3019
								
							
						
					
					
						commit
						de733a0682
					
				
					 19 changed files with 545 additions and 212 deletions
				
			
		|  | @ -223,6 +223,15 @@ public class AuthService( | |||
|     { | ||||
|         AssertValidAuthType(authType, null); | ||||
| 
 | ||||
|         // This is already checked when | ||||
|         var currentCount = await db | ||||
|             .AuthMethods.Where(m => m.UserId == userId && m.AuthType == authType) | ||||
|             .CountAsync(ct); | ||||
|         if (currentCount >= AuthUtils.MaxAuthMethodsPerType) | ||||
|             throw new ApiError.BadRequest( | ||||
|                 "Too many linked accounts of this type, maximum of 3 per account." | ||||
|             ); | ||||
| 
 | ||||
|         var authMethod = new AuthMethod | ||||
|         { | ||||
|             Id = snowflakeGenerator.GenerateSnowflake(), | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue