mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix: review notes
This commit is contained in:
@@ -7439,65 +7439,6 @@
|
||||
"x-immich-state": "Stable"
|
||||
}
|
||||
},
|
||||
"/oauth/link": {
|
||||
"post": {
|
||||
"description": "Link an OAuth account to the authenticated user.",
|
||||
"operationId": "linkOAuthAccount",
|
||||
"parameters": [],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/OAuthLinkDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserAdminResponseDto"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearer": []
|
||||
},
|
||||
{
|
||||
"cookie": []
|
||||
},
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
],
|
||||
"summary": "Link OAuth account",
|
||||
"tags": [
|
||||
"Authentication"
|
||||
],
|
||||
"x-immich-history": [
|
||||
{
|
||||
"version": "v1",
|
||||
"state": "Added"
|
||||
},
|
||||
{
|
||||
"version": "v1",
|
||||
"state": "Beta"
|
||||
},
|
||||
{
|
||||
"version": "v2",
|
||||
"state": "Stable"
|
||||
}
|
||||
],
|
||||
"x-immich-state": "Stable"
|
||||
}
|
||||
},
|
||||
"/oauth/mobile-redirect": {
|
||||
"get": {
|
||||
"description": "Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting.",
|
||||
@@ -18072,6 +18013,10 @@
|
||||
"pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$",
|
||||
"type": "string"
|
||||
},
|
||||
"linkToken": {
|
||||
"description": "OAuth link token to consume on successful login",
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"description": "User password",
|
||||
"example": "password",
|
||||
@@ -19116,27 +19061,6 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"OAuthLinkDto": {
|
||||
"properties": {
|
||||
"codeVerifier": {
|
||||
"description": "OAuth code verifier (PKCE)",
|
||||
"type": "string"
|
||||
},
|
||||
"linkToken": {
|
||||
"description": "OAuth link token from prior callback",
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"description": "OAuth state parameter",
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"description": "OAuth callback URL",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"OAuthTokenEndpointAuthMethod": {
|
||||
"description": "OAuth token endpoint auth method",
|
||||
"enum": [
|
||||
@@ -21875,6 +21799,10 @@
|
||||
"pattern": "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$",
|
||||
"type": "string"
|
||||
},
|
||||
"linkToken": {
|
||||
"description": "OAuth link token to consume on successful login",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "User name",
|
||||
"example": "Admin",
|
||||
|
||||
@@ -1008,6 +1008,8 @@ export type AssetOcrResponseDto = {
|
||||
export type SignUpDto = {
|
||||
/** User email */
|
||||
email: string;
|
||||
/** OAuth link token to consume on successful login */
|
||||
linkToken?: string;
|
||||
/** User name */
|
||||
name: string;
|
||||
/** User password */
|
||||
@@ -1024,6 +1026,8 @@ export type ChangePasswordDto = {
|
||||
export type LoginCredentialDto = {
|
||||
/** User email */
|
||||
email: string;
|
||||
/** OAuth link token to consume on successful login */
|
||||
linkToken?: string;
|
||||
/** User password */
|
||||
password: string;
|
||||
};
|
||||
@@ -1421,16 +1425,6 @@ export type OAuthCallbackDto = {
|
||||
/** OAuth callback URL */
|
||||
url: string;
|
||||
};
|
||||
export type OAuthLinkDto = {
|
||||
/** OAuth code verifier (PKCE) */
|
||||
codeVerifier?: string;
|
||||
/** OAuth link token from prior callback */
|
||||
linkToken?: string;
|
||||
/** OAuth state parameter */
|
||||
state?: string;
|
||||
/** OAuth callback URL */
|
||||
url?: string;
|
||||
};
|
||||
export type PartnerResponseDto = {
|
||||
avatarColor: UserAvatarColor;
|
||||
/** User email */
|
||||
@@ -4954,21 +4948,6 @@ export function finishOAuth({ oAuthCallbackDto }: {
|
||||
body: oAuthCallbackDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* Link OAuth account
|
||||
*/
|
||||
export function linkOAuthAccount({ oAuthLinkDto }: {
|
||||
oAuthLinkDto: OAuthLinkDto;
|
||||
}, opts?: Oazapfts.RequestOpts) {
|
||||
return oazapfts.ok(oazapfts.fetchJson<{
|
||||
status: 200;
|
||||
data: UserAdminResponseDto;
|
||||
}>("/oauth/link", oazapfts.json({
|
||||
...opts,
|
||||
method: "POST",
|
||||
body: oAuthLinkDto
|
||||
})));
|
||||
}
|
||||
/**
|
||||
* Redirect OAuth to mobile
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user