-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Facebook login to FTW #1364
Conversation
d129a75
to
b861f0e
Compare
528af30
to
927c290
Compare
63f2a32
to
2118460
Compare
… other small UI fixes
2118460
to
892118d
Compare
892118d
to
4a9d00e
Compare
@@ -48,6 +53,10 @@ const initialState = { | |||
// signup | |||
signupError: null, | |||
signupInProgress: false, | |||
|
|||
// confirm (create use with idp) | |||
confirmErro: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I confirm, Is this a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@feorgie yes that's a typo, it should be confirmError
. Thanks for letting us know!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem!
This is a base branch for adding a Facebook login. On the high level this PR contains the following changes:
Generic:
REACT_APP_FACEBOOK_APP_ID
andFACEBOOK_APP_SECRET
. The Facebook app id must be exposed to the frontend (using prefix REACT_APP_) so that we can determine if the Facebook login should be enabled or not.st-authinfo
andst-autherror
are used to store information. The expiration time for both cookies is 15 minutes.Server:
createUserWithIdp
andloginWithIdp
- for using these, you need the latest version ofsharetribe-flex-sdk
auth/facebook
andauth/facebook/callback
AuthenticationPage:
authWithFacebook
ConfirmForm
form confirming information fetched from the identity provider (IdP, e.g. Facebook)Button:
CheckoutPage and ListingPage:
saveToSessionStorage
tosetInitialValues
function so that we can store initial values to session storage before user is redirected to Facebook login. This enables redirecting user directly to CheckoutPage after authenticating from ListingPageContactDetailsPage and PasswordChangePage:
How the Flow works in FTW
Log in with Facebook
![Social Logins SSO@2x](https://user-images.githubusercontent.com/9502221/96112891-01312200-0eec-11eb-8540-c0122a554f6a.png)
Sign up with Facebook
![Social Logins SSO@2x (1)](https://user-images.githubusercontent.com/9502221/96112726-c6c78500-0eeb-11eb-8594-11dd773e5b3a.png)
This can be merged after the following parts have been completed:
authWithIdp
andcreateWithIdp
endpoints to server (Add idp endpoints to FTW server #1365)