Skip to content
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-17386338 - Secure SSR Endpoints by Verifying SLAS Callback Requests #2180

Merged
Prev Previous commit
Next Next commit
revert changes
yunakim714 committed Jan 14, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 7ffd098045bdf35f8535af2137a57225adeec3d1
4 changes: 2 additions & 2 deletions packages/template-retail-react-app/app/ssr.js
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ import {emailLink} from '@salesforce/retail-react-app/app/utils/marketing-cloud/
import {
PASSWORDLESS_LOGIN_LANDING_PATH,
RESET_PASSWORD_LANDING_PATH
} from './constants'
} from '@salesforce/retail-react-app/app/constants'
import {validateSlasCallbackToken} from '@salesforce/retail-react-app/app/utils/jwt-utils'

const config = getConfig()
@@ -56,7 +56,7 @@ const options = {
// 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: false,
useSLASPrivateClient: true,
applySLASPrivateClientToEndpoints:
/oauth2\/(token|passwordless|password\/(login|token|reset|action))/,

4 changes: 2 additions & 2 deletions packages/template-retail-react-app/config/default.js
Original file line number Diff line number Diff line change
@@ -17,11 +17,11 @@ module.exports = {
},
login: {
passwordless: {
enabled: true,
enabled: false,
callbackURI: '/passwordless-login-callback'
},
social: {
enabled: true,
enabled: false,
idps: ['google', 'apple'],
redirectURI: '/social-callback'
},