-
Notifications
You must be signed in to change notification settings - Fork 138
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
@W-17263304 Passwordless login with marketing cloud #2131
base: feature-passwordless-social-login
Are you sure you want to change the base?
@W-17263304 Passwordless login with marketing cloud #2131
Conversation
…k-email-page Signed-off-by: Yuna Kim <[email protected]>
…d in with paswordless once
…wordless-poc-mc Signed-off-by: Jinsu Ha <[email protected]>
…into W-17093012-passwordless-poc-mc
…eCommerceCloud/pwa-kit into W-17093012-passwordless-poc-mc
import {isServer} from '@salesforce/retail-react-app/app/utils/utils' | ||
import {getConfig} from '@salesforce/pwa-kit-runtime/utils/ssr-config' | ||
|
||
const LOGIN_ERROR_MESSAGE = defineMessage({ | ||
defaultMessage: 'Incorrect username or password, please try again.', | ||
id: 'login_page.error.incorrect_username_or_password' | ||
}) | ||
const INVALID_TOKEN_ERROR_MESSAGE = defineMessage({ | ||
defaultMessage: 'Invalid token, please try again.', |
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.
@@ -1096,8 +1097,9 @@ class Auth { | |||
}, | |||
{ | |||
...(callbackURI && {callbackURI: callbackURI}), | |||
...(usid && {usid}), |
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.
sending usid as part of the authorizePasswordless
API call in an attempt to make the merge basket work
@@ -163,6 +164,8 @@ const CommerceApiProvider = (props: CommerceApiProviderProps): ReactElement => { | |||
clientSecret, | |||
silenceWarnings, | |||
configLogger, | |||
defaultDnt, | |||
callbackURI, |
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.
this was needed so that the callbackURI could be picked up automatically
@@ -68,7 +68,7 @@ const AppConfig = ({children, locals = {}}) => { | |||
headers={headers} | |||
// Uncomment 'enablePWAKitPrivateClient' to use SLAS private client login flows. | |||
// Make sure to also enable useSLASPrivateClient in ssr.js when enabling this setting. | |||
// enablePWAKitPrivateClient={true} | |||
enablePWAKitPrivateClient={true} |
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.
probably want to revert this before we merge but leaving it now for testing purposes
…eCommerceCloud/pwa-kit into W-17093012-passwordless-poc-mc
import express from 'express' | ||
import {emailLink} from './marketing-cloud-email-link' | ||
|
||
const ENABLE_SSR_POST = (process.env.ENABLE_SSR_POST || "").toLowerCase() === "true" |
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.
Looking at this feature flag it's not immediately clear what this does, maybe we can rename to ENABLE_PASSWORDLESS_LOGIN
, ENABLE_MARKETING_CLOUD_PASSWORDLESS
, or something along those lines?
@@ -0,0 +1,105 @@ | |||
/* |
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.
Let's put these under the util
folder or create a new directory for these like marketing-cloud
Description
This both supports passwordless login within the retail react app UI and adds callback endpoints to ssr.js for customers to connect it with Marketing Cloud.
Types of Changes
Changes
How to Test-Drive This PR
Merge Basket with Passwordless Login
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization