Closed jaepass closed 3 years ago
When the user enters their email to log in, they will get an email sent to them. This email will contain a link back to the demo store URL. This page will need to accept a request which contains a token in the URL, and will need to make a request to Chec to exchange the token for a JWT: ``` POST /v1/customers/exchange-token token={token_from_url} ``` This API returns a JSON web token which authorizes the customer for 24 hours. Ideally we also do an API call to fetch the user's data ( `GET /v1/customers/{customer_id}` ) at this point, and we can store that locally too. After login, we can redirect the user to their "customer home" page which is built in another task.
thanks for your help guys!
App.js
on client sidecompose
HOC and usesetCustomer
action from Redux store withconnect