-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update authentication options in createServerClient #60
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,14 +5,7 @@ import type { | |
} from "@supabase/supabase-js/dist/module/lib/types"; | ||
|
||
import { VERSION } from "./version"; | ||
import { | ||
DEFAULT_COOKIE_OPTIONS, | ||
combineChunks, | ||
createChunks, | ||
deleteChunks, | ||
isBrowser, | ||
isChunkLike, | ||
} from "./utils"; | ||
|
||
import { createStorageFromOptions, applyServerStorage } from "./cookies"; | ||
import type { | ||
CookieOptionsWithName, | ||
|
@@ -170,11 +163,11 @@ export function createServerClient< | |
...(options?.cookieOptions?.name | ||
? { storageKey: options.cookieOptions.name } | ||
: null), | ||
...options?.auth, | ||
flowType: "pkce", | ||
autoRefreshToken: false, | ||
detectSessionInUrl: false, | ||
persistSession: true, | ||
...options?.auth, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would, currently is it not possible There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right, it would make it configurable. I'm still not sure it'll fix the concern around a service role client though. Let's complete discussing the issue on the thread and circle back to this PR if needed |
||
storage, | ||
}, | ||
}, | ||
|
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.
It looks like it'd no longer be possible to override
persistSession
,autoRefreshToken
etc.. with user supplied options after this change. Not sure if we'd want thatLet me know if I've misunderstood the change though.