Skip to content

Commit

Permalink
util/api.js: Add createWithIdp endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
OtterleyW committed Sep 22, 2020
1 parent 2abe651 commit e5d7fc3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/util/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,15 @@ export const initiatePrivileged = body => {
export const transitionPrivileged = body => {
return post('/api/transition-privileged', body);
};

// Create user with identity provider (e.g. Facebook or Google)
//
// If the authentication with idp fails, we will create a new user.
// For that user needs to confirm data fetched from the idp.
// This endpoint creates the new user with confirmed data.
//
// See `server/api/auth/createWithIdp.js` to see what data should
// be sent in the body.
export const createWithIdp = body => {
return post('/api/auth/create-with-idp', body);
};

0 comments on commit e5d7fc3

Please sign in to comment.