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
Exchange authorization code for access and refresh token
Refresh access token using refresh token
Revoke access and refresh tokens
Client Application Owners
Revoke all tokens of the application for all users
Resource Owners
List all authorized applications
Revoke all tokens of an authorized application for the owner
Endpoints
GET /oauth2/authorize
Authorize a Client Application
Securely allows or denies the client application's request to access the resource user's information with specified scopes. It returns a one-time and short-lived authorization code, which will be used to follow up with the token-code exchange.
Authorization Web Flow
(1) The client application issues the initial authorization request to oauth2/authorize with the above parameters;
(2) If the user is not logged in, redirects to the primary CAS login with oauth2/callbackAuthorize as service;
(3) Both step 1 and 2 end up redirecting the user to oauth2/callbackAuthorize for service validation;
(4) After validation, redirects to oauth2/callbackAuthorize one more time, which checks previous decisions and asks the user to allow or deny the authorization if necessary.
(5) If denied, redirects to /oauth2/callbackAuthorizeAction?action=DENY; if allowed, redirects to /oauth2/callbackAuthorizeAction?action=ALLOW
(6) Finally, for both decisions in step 5, redirects the user to the Redirect URI: https://my.app.io/oauth2/callback? with different query parameters as shown below.
Exchanges the authorization code for an access token and potentially a refresh token if offline mode was specified when requesting for the authorization code.
Revokes all tokens associated with a client application specified by the given client ID.
Request
https://accounts.osf.io/oauth2/revoke
POST Body Parameters
Parameter
Value / Example
Note
client_id
ffe5247b810045a8a9277d3b3b4edc7a
client_secret
5PgE96R3Z53dBuwBDkJfbK6ItDXvGhaxYpQ6r4cU
Response Status
HTTP 204 NO CONTENT
Revoke All Tokens for a Resource User
Revokes all tokens of a client application that have been issued to a resource user. The application is specified by the client ID and the user is specified by the principal ID associated with the access token. The token used for authorization must have been generated by the application unless it is of token type CAS.