Skip to content

Sign up with external provider

To use this endpoint, you need to configure external sign up model by calling UseExternalSignUpModel<TModel> method:

Program.cs
builder.Services
.AddAufy<MyUser>(builder.Configuration)
.UseExternalSignUpModel<MySignUpExternalRequest>();
...
MySignUpExternalRequest.cs
public class MySignUpExternalRequest
{
public string AboutMe { get; set; }
public string MySiteUrl { get; set; }
}

This will enable the endpoint and use the model as a request body.

Sign up with external provider endpoint using a special cookie generated by a challenge endpoint. Returns access token in the response body and refresh token as HTTP only cookie for better security.

Info
MethodPOST
Route groupauth
Path{auth}/signup/external
TypeSignUpExternalEndpoint<TUser, TModel>
AuthenticationAufy.ExternalSignUpScheme cookie

Request body

Custom request body model defined by UseExternalSignUpModel<TModel> method.

NameTypeDescription
-

Query parameters

NameTypeDescription
usecookiebooleanUse cookie to store access token. Default is false.

Response body

NameTypeDescription
access_tokenstringJWT token.
expires_innumberToken expiration time in seconds.
token_typestringBearer

Response Cookies

NameTypeDescription
Aufy.RefreshTokenstringHTTP only cookie with refresh token.
Aufy.AccessTokenstringHTTP only cookie with access token. Set only if usecookie query parameter is true.