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

Add some more logging and skip one origin test in auth #2655 #2656

Merged
merged 6 commits into from
Nov 14, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/deploy-v3/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ inputs:
description: 'Tenant URL for Fotoware application'
required: true
fotowareRedirectOrigin:
description: 'Redirect URL for Fotoware auth'
description: 'Redirect Origin for Fotoware auth'
required: true
fotowareAfExportUrl:
description: 'Azure Function img export URL'
Expand Down Expand Up @@ -105,6 +105,7 @@ runs:
--build-arg ARG_FOTOWARE_CLIENT_ID="${{ inputs.fotowareClientId }}" \
--build-arg ARG_FOTOWARE_TENANT_URL="${{ inputs.fotowareTenantUrl }}" \
--build-arg ARG_FOTOWARE_REDIRECT_ORIGIN="${{ inputs.fotowareRedirectOrigin }}" \
--build-arg ARG_FOTOWARE_REDIRECT_URI="${{ inputs.fotowareRedirectUri }}" \
--build-arg ARG_FOTOWARE_AF_EXPORT_URL="${{ inputs.fotowareAfExportUrl }}" \
--build-arg ARG_FOTOWARE_AF_EXPORT_KEY="${{ inputs.fotowareAfExportKey }}" \
--build-arg ARG_SCREEN9_ACCOUNT_ID="${{ inputs.screen9accountId }}" \
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/studios-rollback.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ jobs:
SANITY_STUDIO_FOTOWARE_CLIENT_ID: ${{ secrets.SANITY_STUDIO_FOTOWARE_CLIENT_ID }}
SANITY_STUDIO_FOTOWARE_TENANT_URL: ${{ secrets.SANITY_STUDIO_FOTOWARE_TENANT_URL }}
SANITY_STUDIO_FOTOWARE_REDIRECT_ORIGIN: ${{ secrets.SANITY_STUDIO_FOTOWARE_REDIRECT_ORIGIN }}
SANITY_STUDIO_FOTOWARE_REDIRECT_URI: ${{ secrets.SANITY_STUDIO_FOTOWARE_REDIRECT_URI }}
SANITY_STUDIO_FOTOWARE_AF_EXPORT_URL: ${{ secrets.SANITY_STUDIO_FOTOWARE_AF_EXPORT_URL }}
SANITY_STUDIO_FOTOWARE_AF_EXPORT_KEY: ${{ secrets.SANITY_STUDIO_FOTOWARE_AF_EXPORT_KEY }}
DOCKER_BUILDKIT: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ const FotowareAssetSource = forwardRef<HTMLDivElement>((props: any, ref) => {
const handleAuthEvent = useCallback(
(event: any) => {
const validateAuthEvent = () => {
if (event.origin !== REDIRECT_ORIGIN) {
/* if (event.origin !== REDIRECT_ORIGIN) {
return handleRequestError(`Invalid event origin: ${event.origin}`, setError, 'auth', newWindow)
}
} */

if (event.data?.error) {
const { error, error_description } = event.data
Expand Down Expand Up @@ -175,6 +175,7 @@ const FotowareAssetSource = forwardRef<HTMLDivElement>((props: any, ref) => {
}, [accessToken, handleAuthEvent])

useEffect(() => {
//should not add listener before access token is present?
window.addEventListener('message', handleWidgetEvent)
setContainer(document.createElement('div'))

Expand Down
Loading