Skip to content

Commit 6dd2ee0

Browse files
authored
chore: add decode cookie value strings note to SSR example (#8300)
1 parent 31f754f commit 6dd2ee0

File tree

1 file changed

+5
-0
lines changed
  • src/pages/gen1/[platform]/build-a-backend/server-side-rendering

1 file changed

+5
-0
lines changed

src/pages/gen1/[platform]/build-a-backend/server-side-rendering/index.mdx

+5
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ const amplifyConfig = parseAmplifyConfig(config);
112112
const keyValueStorage = createKeyValueStorageFromCookieStorageAdapter({
113113
get(name) {
114114
const value = ...; // use framework cookie API to get the value by name
115+
// NOTE: When you call `Amplify.configure()` with `{ ssr: true }`,
116+
// the token cookie value strings are encoded. You need to decode
117+
// the value here if the framework cookie API does not decode the value
118+
// strings. For example, you can use `decodeURIComponent(value)`
119+
// to decode the value.
115120
return { name, value };
116121
},
117122
getAll() {

0 commit comments

Comments
 (0)