Skip to content

Commit 4813280

Browse files
committed
🎨 missing persisting access token for fw
1 parent 3bb827b commit 4813280

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

studio/plugins/asset-source-fotoware-v2/src/components/FotowareAssetSource.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
getAuthURL,
2020
getSelectionWidgetURL,
2121
HAS_ENV_VARS,
22+
storeAccessToken,
2223
} from '../utils'
2324
import { Button } from './Button'
2425
import { Iframe } from './Iframe'
@@ -72,7 +73,7 @@ const FotowareAssetSource = forwardRef<HTMLDivElement>((props: any, ref) => {
7273
return arrayBuffer
7374
} catch (error) {
7475
console.error('Error fetching rendition:', error)
75-
setHasError(true)
76+
setIsLoading(false)
7677
return null
7778
}
7879
}
@@ -107,6 +108,7 @@ const FotowareAssetSource = forwardRef<HTMLDivElement>((props: any, ref) => {
107108
if (event?.data) {
108109
const validateEvent = validateAuthEvent()
109110
if (validateEvent) {
111+
storeAccessToken('SelectionFotowareToken', event.data)
110112
setSelectionToken(event.data.access_token)
111113
setIsLogin(false)
112114
setShowSelectionIframe(true)

0 commit comments

Comments
 (0)