Skip to content

Commit

Permalink
fix: Prevent rw graphiql setup from breaking with encryptSession er…
Browse files Browse the repository at this point in the history
…ror (#9582)

Co-authored-by: Daniel Choudhury <[email protected]>
  • Loading branch information
2 people authored and jtoar committed Nov 29, 2023
1 parent 273a0af commit 673de54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf8
charset = utf-8

[*.{js,jsx,ts,tsx,graphql,sql,md,html,mjml,json,jsonc,json5,yml,yaml,template,sh,Dockerfile}]
indent_style = space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ const getDBAuthHeader = async (userId) => {
)
}

const { encryptSession } = await import('@redwoodjs/auth-dbauth-api')
const {
default: { encryptSession },
} = await import('@redwoodjs/auth-dbauth-api')

const id = isNumeric(userId) ? parseInt(userId) : userId
const cookie = encryptSession(JSON.stringify({ id }) + ';' + uuidv4())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ export const getDBAuthHeader = async (userId?: string) => {
)
}

const { encryptSession } = await import('@redwoodjs/auth-dbauth-api')
const {
default: { encryptSession },
} = await import('@redwoodjs/auth-dbauth-api')

const id = isNumeric(userId) ? parseInt(userId) : userId
const cookie = encryptSession(JSON.stringify({ id }) + ';' + uuidv4())
Expand Down

0 comments on commit 673de54

Please sign in to comment.