mirror of
https://github.com/modrinth/code.git
synced 2026-09-02 04:56:52 +00:00
feat: implement under 13 DOB guard and email/password validation route
This commit is contained in:
@@ -57,6 +57,22 @@ export class LabrinthAuthV2Module extends AbstractModule {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate email/password inputs for account creation without creating an account.
|
||||
*
|
||||
* @param data - Prospective account credentials
|
||||
*/
|
||||
public async validateCreateAccount(
|
||||
data: Labrinth.Auth.v2.ValidateCreateAccountRequest,
|
||||
): Promise<void> {
|
||||
return this.client.request(`/auth/create/validate`, {
|
||||
api: 'labrinth',
|
||||
version: 2,
|
||||
method: 'POST',
|
||||
body: data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new account from an OAuth callback flow state
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user