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

fix: Prevent rw graphiql setup from breaking with encryptSession error #9582

Merged
merged 4 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err, this is unrelated, but didn't seem worth its own PR. Let me know if y'all disagree and I'll turn it into a separate PR.


[*.{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,7 @@
)
}

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

Check warning on line 23 in packages/cli/src/commands/setup/graphiql/supportedProviders.js

View workflow job for this annotation

GitHub Actions / 🏗 Build, lint, test / ubuntu-latest / node 18 latest

Replace `·default:·{·encryptSession·}` with `⏎····default:·{·encryptSession·},⏎·`

Check warning on line 23 in packages/cli/src/commands/setup/graphiql/supportedProviders.js

View workflow job for this annotation

GitHub Actions / 🏗 Build, lint, test / windows-latest / node 18 latest

Replace `·default:·{·encryptSession·}` with `⏎····default:·{·encryptSession·},⏎·`

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