You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 292ac6d
Browse filesBrowse the repository at this point in the historyBrowse files
Adds SignUp, GetOrcidSignUpAuthorizationUrl and ConnectOrcidForSignUp for
POST /users/signup, GET /users/signup/orcid/authorize and
POST /users/signup/orcid, which are called without authentication.
AuthenticatedUser gains authenticatedOrcid.
ReadError and WriteError now carry the HTTP statusCode and the server's
fieldErrors, so clients can show validation errors next to form fields.
-[Delete Current API Token](#delete-current-api-token)
114
115
-[Recreate Current API Token](#recreate-current-api-token)
115
116
-[Register User](#register-user)
117
+
-[Sign Up](#sign-up)
118
+
-[Connect ORCID For Sign-Up](#connect-orcid-for-sign-up)
116
119
-[Roles](#Roles)
117
120
-[Roles read use cases](#roles-read-use-cases)
118
121
-[Get User Selectable Roles](#get-user-selectable-roles)
@@ -2747,6 +2750,8 @@ There is a third optional parameter called `datasetType` which will include addi
2747
2750
2748
2751
Returns the current [AuthenticatedUser](../src/users/domain/models/AuthenticatedUser.ts) corresponding to the authentication mechanism provided through `ApiConfig`.
2749
2752
2753
+
The `authenticatedOrcid` property holds the URL of the ORCID iD the user has authenticated and linked to their account, if any.
Returns the ORCID authorization URL that sends a new user to ORCID to authenticate their ORCID iD while signing up. Send the user's browser to this URL; after they sign in, ORCID redirects back to `redirectUri` with `code` and `state` query parameters, which are then passed to [Connect ORCID For Sign-Up](#connect-orcid-for-sign-up).
2794
+
2795
+
No credentials are sent, so this works for anonymous users. The installation needs an ORCID OAuth2 provider (it can be disabled for login), and `redirectUri` must be listed in its `dataverse.api.signup.orcid-redirect-uris` setting.
Creates a new builtin user account, given a [SignUpDTO](../src/users/domain/dtos/SignUpDTO.ts). No credentials are sent, so this works for anonymous users. The installation must enable the `api-builtin-user-signup` feature flag and allow sign-up (`:AllowSignUp`).
2888
+
2889
+
To save an authenticated ORCID iD to the new account, include the `orcidToken` returned by [Connect ORCID For Sign-Up](#connect-orcid-for-sign-up).
The [SignUpResult](../src/users/domain/models/SignUpResult.ts) is `{ status: 'created', identifier }` when the account was created right away, or `{ status: 'pending' }` when the installation requires email verification before creating it.
2927
+
2928
+
### Connect ORCID For Sign-Up
2929
+
2930
+
Exchanges the `code` and `state` that ORCID returns to the redirect URI for the user's authenticated ORCID iD, given an [OrcidSignUpCallbackDTO](../src/users/domain/dtos/OrcidSignUpCallbackDTO.ts). Use the same `redirectUri` that was passed to [Get ORCID Sign-Up Authorization URL](#get-orcid-sign-up-authorization-url). No credentials are sent.
2931
+
2932
+
Returns an [OrcidSignUpConnection](../src/users/domain/models/OrcidSignUpConnection.ts) with the ORCID iD, any details the user shares on their ORCID record (useful to pre-fill a sign-up form), and an `orcidToken` to include in [Sign Up](#sign-up). The token is valid for 30 minutes.
The use case throws a `WriteError` with `statusCode` 409 when the ORCID iD is already linked to another account, and 400 when the state is invalid or expired.
0 commit comments