This repository was archived by the owner on Oct 10, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2550 lines (2427 loc) · 78.3 KB
/
openapi.yaml
File metadata and controls
2550 lines (2427 loc) · 78.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: "3.0.0"
info:
version: 1.0.0
title: "Nhost Authentication API"
description: "Comprehensive authentication service for managing user identities, sessions, and authentication methods"
license:
name: "MIT License"
url: "https://opensource.org/licenses/MIT"
contact:
name: "Nhost Support"
email: "support@nhost.io"
url: "https://nhost.io"
servers:
- url: "https://{subdomain}.auth.{region}.nhost.run/v1"
description: "Nhost Authentication API Server"
tags:
- name: authentication
description: "User authentication operations including sign-in, sign-up, and various authentication methods (email/password, passwordless, OAuth, WebAuthn, MFA)"
- name: security
description: "Security-related operations including Personal Access Tokens, WebAuthn management, account elevation, and account linking"
- name: session
description: "Session management operations including token refresh, verification, and sign-out"
- name: user
description: "User profile and account management operations including email/password changes, MFA configuration, and profile updates"
- name: system
description: "System operations including health checks, service version, and public key endpoints"
- name: verification
description: "Email and ticket verification operations for confirming user actions"
- name: excludeme
description: "These operations are not intended to be used directly by clients and should be excluded from client SDKs"
paths:
/.well-known/jwks.json:
get:
summary: Get public keys for JWT verification in JWK Set format
description: Retrieve the JSON Web Key Set (JWKS) containing public keys used to verify JWT signatures. This endpoint is used by clients to validate access tokens.
operationId: getJWKs
tags:
- system
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/JWKSet"
description: >-
The public keys in JWK Set format
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/elevate/webauthn:
post:
summary: Elevate access for an already signed in user using FIDO2 Webauthn
description: Generate a Webauthn challenge for elevating user permissions
operationId: elevateWebauthn
tags:
- security
security:
- BearerAuth: []
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/PublicKeyCredentialRequestOptions"
description: >-
Challenge sent for elevation
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: An error occurred while processing the request
/elevate/webauthn/verify:
post:
summary: Verify FIDO2 Webauthn authentication using public-key cryptography for elevation
description: Complete Webauthn elevation by verifying the authentication response
operationId: verifyElevateWebauthn
tags:
- security
security:
- BearerAuth: []
requestBody:
description: WebAuthn credential assertion response for elevation verification
content:
application/json:
schema:
$ref: "#/components/schemas/SignInWebauthnVerifyRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/SessionPayload"
description: >-
Elevated successfully
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: An error occurred while processing the request
/healthz:
get:
summary: Health check (GET)
description: Verify if the authentication service is operational using GET method
operationId: healthCheckGet
tags:
- system
responses:
"200":
description: "Service is healthy and operational"
content:
application/json:
schema:
$ref: "#/components/schemas/OKResponse"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
head:
summary: Health check (HEAD)
description: Verify if the authentication service is operational using HEAD method
operationId: healthCheckHead
tags:
- system
responses:
"200":
description: "Service is healthy and operational"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/link/idtoken:
post:
summary: Link a user account with the provider's account using an id token
description: Link the authenticated user's account with an external OAuth provider account using an ID token. Requires elevated permissions.
operationId: linkIdToken
tags:
- security
security:
- BearerAuthElevated: []
requestBody:
description: ID token and provider information for account linking
content:
application/json:
schema:
$ref: "#/components/schemas/LinkIdTokenRequest"
required: true
responses:
"200":
description: >-
Identity linked successfully
content:
application/json:
schema:
$ref: "#/components/schemas/OKResponse"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/mfa/totp/generate:
get:
summary: Generate TOTP secret
description: Generate a Time-based One-Time Password (TOTP) secret for setting up multi-factor authentication
operationId: changeUserMfa
tags:
- user
security:
- BearerAuth: []
responses:
"200":
description: "TOTP secret successfully generated"
content:
application/json:
schema:
$ref: "#/components/schemas/TotpGenerateResponse"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/pat:
post:
summary: Create a Personal Access Token (PAT)
description: Generate a new Personal Access Token for programmatic API access. PATs are long-lived tokens that can be used instead of regular authentication for automated systems. Requires elevated permissions.
operationId: createPAT
tags:
- security
security:
- BearerAuthElevated: []
requestBody:
description: Personal Access Token creation request with expiration and metadata
content:
application/json:
schema:
$ref: "#/components/schemas/CreatePATRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/CreatePATResponse"
description: >-
Successfully created a Personal Access Token
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/anonymous:
post:
summary: Sign in anonymously
description: Create an anonymous user session without providing credentials. Anonymous users can be converted to regular users later via the deanonymize endpoint.
operationId: signInAnonymous
tags:
- authentication
requestBody:
description: Optional user profile information for anonymous sign-in
content:
application/json:
schema:
$ref: "#/components/schemas/SignInAnonymousRequest"
required: false
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/SessionPayload"
description: >-
Successfully signed in
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/email-password:
post:
summary: Sign in with email and password
description: Authenticate a user with their email and password. Returns a session object or MFA challenge if two-factor authentication is enabled.
operationId: signInEmailPassword
tags:
- authentication
requestBody:
description: User credentials for email and password authentication
content:
application/json:
schema:
$ref: "#/components/schemas/SignInEmailPasswordRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/SignInEmailPasswordResponse"
description: "Authentication successful. If MFA is enabled, a challenge will be returned instead of a session."
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/idtoken:
post:
summary: Sign in with an ID token
description: Authenticate using an ID token from a supported OAuth provider (Apple or Google). Creates a new user account if one doesn't exist.
operationId: signInIdToken
tags:
- authentication
requestBody:
description: ID token and provider information for authentication
content:
application/json:
schema:
$ref: "#/components/schemas/SignInIdTokenRequest"
required: true
responses:
"200":
description: >-
Successfully signed in
content:
application/json:
schema:
$ref: "#/components/schemas/SessionPayload"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/mfa/totp:
post:
summary: Verify TOTP for MFA
description: Complete the multi-factor authentication by verifying a Time-based One-Time Password (TOTP). Returns a session if validation is successful.
operationId: verifySignInMfaTotp
tags:
- authentication
requestBody:
description: MFA ticket and TOTP code for multi-factor authentication verification
content:
application/json:
schema:
$ref: "#/components/schemas/SignInMfaTotpRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/SessionPayload"
description: "MFA verification successful, session created"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/otp/email:
post:
summary: Sign in with email OTP
description: Initiate email-based one-time password authentication. Sends an OTP to the specified email address. If the user doesn't exist, a new account will be created with the provided options.
operationId: signInOTPEmail
tags:
- authentication
requestBody:
description: Email address and optional user options for OTP authentication
content:
application/json:
schema:
$ref: "#/components/schemas/SignInOTPEmailRequest"
required: true
responses:
"200":
description: >-
OTP sent to user's email successfully
content:
application/json:
schema:
$ref: "#/components/schemas/OKResponse"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/otp/email/verify:
post:
summary: Verify email OTP
description: Complete email OTP authentication by verifying the one-time password. Returns a session if validation is successful.
operationId: verifySignInOTPEmail
tags:
- authentication
requestBody:
description: OTP code and email address for verification
content:
application/json:
schema:
$ref: "#/components/schemas/SignInOTPEmailVerifyRequest"
required: true
responses:
"200":
description: >-
Magic link sent to user's email successfully
content:
application/json:
schema:
$ref: "#/components/schemas/SignInOTPEmailVerifyResponse"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/passwordless/email:
post:
summary: Sign in with magic link email
description: Initiate passwordless authentication by sending a magic link to the user's email. If the user doesn't exist, a new account will be created with the provided options.
operationId: signInPasswordlessEmail
tags:
- authentication
requestBody:
description: Email address and optional user options for magic link authentication
content:
application/json:
schema:
$ref: "#/components/schemas/SignInPasswordlessEmailRequest"
required: true
responses:
"200":
description: "Magic link email sent successfully"
content:
application/json:
schema:
$ref: "#/components/schemas/OKResponse"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/passwordless/sms:
post:
operationId: signInPasswordlessSms
summary: Sign in with SMS OTP
description: Initiate passwordless authentication by sending a one-time password to the user's phone number. If the user doesn't exist, a new account will be created with the provided options.
tags:
- authentication
requestBody:
description: Phone number and optional user options for SMS OTP authentication
content:
application/json:
schema:
$ref: '#/components/schemas/SignInPasswordlessSmsRequest'
required: true
responses:
'200':
description: >-
OTP sent to user's phone number successfully
content:
application/json:
schema:
$ref: '#/components/schemas/OKResponse'
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/passwordless/sms/otp:
post:
operationId: verifySignInPasswordlessSms
summary: Verify SMS OTP
description: Complete passwordless SMS authentication by verifying the one-time password. Returns a session if validation is successful.
tags:
- authentication
requestBody:
description: Phone number and OTP code for SMS verification
content:
application/json:
schema:
$ref: '#/components/schemas/SignInPasswordlessSmsOtpRequest'
required: true
responses:
'200':
description: User successfully authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/SignInPasswordlessSmsOtpResponse'
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/pat:
post:
summary: Sign in with Personal Access Token (PAT)
description: Authenticate using a Personal Access Token. PATs are long-lived tokens that can be used for programmatic access to the API.
operationId: signInPAT
tags:
- authentication
requestBody:
description: Personal Access Token for authentication
content:
application/json:
schema:
$ref: "#/components/schemas/SignInPATRequest"
required: true
responses:
"200":
description: >-
Successfully signed in
content:
application/json:
schema:
$ref: "#/components/schemas/SessionPayload"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/provider/{provider}:
get:
summary: Sign in with an OAuth2 provider
description: Initiate OAuth2 authentication flow with a social provider. Redirects the user to the provider's authorization page.
operationId: signInProvider
tags:
- authentication
parameters:
- $ref: "#/components/parameters/SignInProvider"
- name: allowedRoles
in: query
required: false
description: Array of allowed roles for the user
style: form
explode: false
schema:
type: array
items:
type: string
example:
- me
- user
- name: defaultRole
in: query
required: false
description: Default role for the user
schema:
type: string
example: user
- name: displayName
in: query
required: false
description: Display name for the user
schema:
type: string
pattern: ^[\p{L}\p{N}\p{S} ,.'-]+$
maxLength: 32
example: John Smith
- name: locale
in: query
required: false
description: A two-characters locale
schema:
type: string
maxLength: 2
minLength: 2
example: en
- name: metadata
in: query
required: false
description: Additional metadata for the user (JSON encoded string)
content:
application/json:
schema:
type: object
additionalProperties: true
example:
firstName: John
lastName: Smith
- name: redirectTo
in: query
required: false
description: URI to redirect to
schema:
type: string
format: uri
example: https://my-app.com/catch-redirection
- name: connect
in: query
required: false
description: >-
If set, this means that the user is already authenticated and wants to link their account. This needs to be a valid JWT access token.
schema:
type: string
responses:
"302":
description: Redirect to social provider
headers:
Location:
$ref: "#/components/headers/RedirectLocation"
content: {}
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/provider/{provider}/callback:
get:
summary: OAuth2 provider callback endpoint
description: Handles the callback from OAuth2 providers after user authorization. Processes the authorization code and creates a user session.
operationId: signInProviderCallbackGet
tags:
- authentication
- excludeme
parameters:
- $ref: "#/components/parameters/SignInProvider"
- name: code
in: query
description: Authorization code provided by the authentication provider
schema:
type: string
- name: id_token
in: query
description: ID token provided by the authentication provider
schema:
type: string
- name: state
in: query
required: true
description: State parameter to avoid CSRF attacks
schema:
type: string
- name: oauth_token
in: query
required: false
description: OAuth token for the provider (e.g., X)
schema:
type: string
- name: oauth_verifier
in: query
required: false
description: OAuth verifier for the provider (e.g., X)
schema:
type: string
- name: error
in: query
required: false
description: Error message if authentication failed
schema:
type: string
- name: error_description
in: query
required: false
description: Detailed error description if authentication failed
schema:
type: string
- name: error_uri
in: query
required: false
description: URI with more information about the error
schema:
type: string
responses:
"302":
description: Redirect to client application after successful authentication
headers:
Location:
$ref: "#/components/headers/RedirectLocation"
content: {}
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
post:
summary: OAuth2 provider callback endpoint (form_post)
description: Handles OAuth2 provider callbacks using form_post response mode. Used by providers like Apple that send data via POST instead of query parameters.
operationId: signInProviderCallbackPost
tags:
- authentication
- excludeme
parameters:
- $ref: "#/components/parameters/SignInProvider"
requestBody:
description: OAuth2 provider callback data including authorization code, ID token, and state
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
code:
type: string
nullable: true
description: Authorization code provided by the authentication provider
id_token:
type: string
nullable: true
description: ID token provided by the authentication provider
state:
type: string
description: State parameter to avoid CSRF attacks
user:
type: string
nullable: true
description: JSON string containing user information (only provided on first authentication with Apple)
error:
type: string
nullable: true
description: Error message if authentication failed
error_description:
type: string
nullable: true
description: Detailed error description if authentication failed
error_uri:
type: string
nullable: true
description: URI with more information about the error
required:
- state
additionalProperties: true
responses:
"302":
description: Redirect to client application after successful authentication
headers:
Location:
$ref: "#/components/headers/RedirectLocation"
content: {}
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signin/webauthn:
post:
summary: Sign in with Webauthn
description: >-
Initiate a Webauthn sign-in process by sending a challenge to the user's device.
The user must have previously registered a Webauthn credential.
operationId: signInWebauthn
requestBody:
description: Optional email address to help identify the user for WebAuthn authentication
content:
application/json:
schema:
$ref: "#/components/schemas/SignInWebauthnRequest"
required: false
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/PublicKeyCredentialRequestOptions"
description: >-
Challenge sent
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
tags:
- authentication
/signin/webauthn/verify:
post:
summary: Verify Webauthn sign-in
description: >-
Complete the Webauthn sign-in process by verifying the response from the user's device.
Returns a session if validation is successful.
operationId: verifySignInWebauthn
requestBody:
description: WebAuthn credential assertion response from the user's authenticator device
content:
application/json:
schema:
$ref: "#/components/schemas/SignInWebauthnVerifyRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/SessionPayload"
description: >-
Sign in successful
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
tags:
- authentication
/signout:
post:
summary: Sign out
description: End the current user session by invalidating refresh tokens. Optionally sign out from all devices.
operationId: signOut
tags:
- session
security:
- BearerAuth: []
- {}
requestBody:
description: Sign-out options including refresh token and whether to sign out from all devices
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/SignOutRequest"
responses:
"200":
description: "Successfully signed out"
content:
application/json:
schema:
$ref: "#/components/schemas/OKResponse"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signup/email-password:
post:
summary: Sign up with email and password
description: Register a new user account with email and password. Returns a session if email verification is not required, otherwise returns null session.
operationId: signUpEmailPassword
tags:
- authentication
requestBody:
description: User registration information including email, password, and optional profile data
content:
application/json:
schema:
$ref: "#/components/schemas/SignUpEmailPasswordRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/SessionPayload"
description: "Registration successful. If email verification is required, session will be null."
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/signup/webauthn:
post:
summary: Sign up with Webauthn
description: >-
Initiate a Webauthn sign-up process by sending a challenge to the user's device.
The user must not have an existing account.
operationId: signUpWebauthn
requestBody:
description: Email address and optional user options for WebAuthn registration
content:
application/json:
schema:
$ref: "#/components/schemas/SignUpWebauthnRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/PublicKeyCredentialCreationOptions"
description: >-
Challenge sent
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
tags:
- authentication
/signup/webauthn/verify:
post:
summary: Verify Webauthn sign-up
description: >-
Complete the Webauthn sign-up process by verifying the response from the user's device.
Returns a session if validation is successful.
operationId: verifySignUpWebauthn
requestBody:
description: WebAuthn credential creation response and optional user profile information
content:
application/json:
schema:
$ref: "#/components/schemas/SignUpWebauthnVerifyRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/SessionPayload"
description: >-
Sign up successful
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
tags:
- authentication
- verification
/token:
post:
summary: Refresh access token
description: Generate a new JWT access token using a valid refresh token. The refresh token used will be revoked and a new one will be issued.
operationId: refreshToken
tags:
- session
requestBody:
description: Refresh token to exchange for a new access token
content:
application/json:
schema:
$ref: "#/components/schemas/RefreshTokenRequest"
required: true
responses:
"200":
content:
application/json:
schema:
$ref: "#/components/schemas/Session"
description: "Access token successfully refreshed"
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/token/verify:
post:
summary: Verify JWT token
description: Verify the validity of a JWT access token. If no request body is provided, the Authorization header will be used for verification.
operationId: verifyToken
tags:
- session
security:
- BearerAuth: []
- {}
requestBody:
description: Optional JWT token to verify (if not provided, Authorization header will be used)
content:
application/json:
schema:
$ref: '#/components/schemas/VerifyTokenRequest'
responses:
'200':
content:
application/json:
schema:
type: string
example: "OK"
description: Valid JWT token
default:
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
description: "An error occurred while processing the request"
/user:
get:
summary: Get user information
description: Retrieve the authenticated user's profile information including roles, metadata, and account status.
operationId: getUser
tags:
- user
security:
- BearerAuth: []
responses:
'200':
content:
application/json: