fix: solidstart/github-oauth: update to current versions#51
fix: solidstart/github-oauth: update to current versions#51greglearns wants to merge 1 commit intolucia-auth:mainfrom
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.
Can you revert this change to make it consistent with the other examples?
| }] | ||
| }); | ||
|
|
||
| declare module "vinxi/server" { |
There was a problem hiding this comment.
How is context.Locals typed?
There was a problem hiding this comment.
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.
Is there no way to override the RequestEventLocals type?
There was a problem hiding this comment.
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
mainversion ofsolidstart/github-oauthdoes not run with the currentmaincode. 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.