Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ const AppConfig = ({children, locals = {}}) => {

const appOrigin = useAppOrigin()

const passwordlessCallback = locals.appConfig.login?.passwordless?.callbackURI

return (
<CommerceApiProvider
shortCode={commerceApiConfig.parameters.shortCode}
Expand All @@ -63,7 +65,7 @@ const AppConfig = ({children, locals = {}}) => {
locale={locals.locale?.id}
currency={locals.locale?.preferredCurrency}
redirectURI={`${appOrigin}/callback`}
passwordlessLoginCallbackURI={locals.appConfig.login?.passwordless?.callbackURI}
passwordlessLoginCallbackURI={passwordlessCallback}
proxy={`${appOrigin}${commerceApiConfig.proxyPath}`}
headers={headers}
// Uncomment 'enablePWAKitPrivateClient' to use SLAS private client login flows.
Expand Down
2 changes: 1 addition & 1 deletion packages/template-retail-react-app/app/ssr.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const options = {
// Set this to false if using a SLAS public client
// When setting this to true, make sure to also set the PWA_KIT_SLAS_CLIENT_SECRET
// environment variable as this endpoint will return HTTP 501 if it is not set
useSLASPrivateClient: true,
useSLASPrivateClient: false,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current client ID in the config is a public client, do we want to change this back to false?

applySLASPrivateClientToEndpoints:
/oauth2\/(token|passwordless|password\/(login|token|reset|action))/,

Expand Down
6 changes: 3 additions & 3 deletions packages/template-retail-react-app/config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ module.exports = {
login: {
passwordless: {
enabled: false,
callbackURI: '/passwordless-login-callback'
callbackURI: process.env.PASSWORDLESS_LOGIN_CALLBACK_URI || '/passwordless-login-callback'
},
social: {
enabled: false,
idps: ['google', 'apple'],
redirectURI: '/social-callback'
redirectURI: process.env.SOCIAL_LOGIN_REDIRECT_URI || '/social-callback'
},
resetPassword: {
callbackURI: '/reset-password-callback'
callbackURI: process.env.RESET_PASSWORD_CALLBACK_URI || '/reset-password-callback'
}
},
defaultSite: 'RefArchGlobal',
Expand Down