-
Notifications
You must be signed in to change notification settings - Fork 55
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: solidstart/github-oauth: update to current versions #51
base: main
Are you sure you want to change the base?
Conversation
solidstart/github-oauth/package.json
Outdated
@@ -1,25 +1,26 @@ | |||
{ | |||
"name": "username-and-password", | |||
"name": "solidstart-github-oauth", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this change to make it consistent with the other examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted.
}); | ||
|
||
declare module "vinxi/server" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is context.Locals
typed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In createMiddleware
, I updated the code to add a type declaration to the event: FetchEvent
so that the types will be more clear to anyone looking at the code.
To answer your question, event.locals
is of type RequestEventLocals
, which is of type:
export interface RequestEventLocals {
[key: string | symbol]: any;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no way to override the RequestEventLocals
type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code added to overide/clarify the RequestEventLocals
type addition.
(Oh my gosh...on a different, funny tangential note, re-reading this thread before I submit my comment... I suddenly had a surreal feeling just now that this thread sounds a little like a ChatGPT code interaction :-) Then I thought, "I am not a LLM!", but then I though, "Would anyone know if I were?" Like a reverse Turing test! I really am a human.)(And since text doesn't communicate emotion or intention, I'm laughing as I write this!) (By the way, this is a great chance for me to thank you for Artic, Oslo, and your re-purposing Lucia as an education opportunity. I really appreciate it, and I thank you. I agree with your decision about Lucia, and it has benefited me. I'm glad that I'm able to give back in this little way of providing some code back to you.).
4634c41
to
9f9fe67
Compare
9f9fe67
to
9f483b3
Compare
The current
main
version ofsolidstart/github-oauth
does not run with the currentmain
code. This PR fixes that so that the example runs correctly, making the minimum necessary changes to bring the code up-to-date. The changes were manually tested and confirmed.