-
Notifications
You must be signed in to change notification settings - Fork 4
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
Auth #9
Auth #9
Conversation
I think some follow up refactoring would be good, but I'd rather do it in another PR so that we can iterate on this. |
src/index.ts
Outdated
accessKeyId: 'abcdefghijklmnopqrstuvwxyz', | ||
secretAccessKey: 'SECRET123456789abcdefghijklmnopqrstuvwxyz' |
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.
Could you support also sessionToken
like in this example?
import { S3Client } from '@aws-sdk/client-s3'
const {
data: { session },
} = await supabase.auth.getSession()
const client = new S3Client({
forcePathStyle: true,
region: 'project_region',
endpoint: 'https://project_ref.supabase.co/storage/v1/s3',
credentials: {
accessKeyId: 'project_ref',
accessSecretKey: 'anonKey',
sessionToken: session.access_token,
},
})
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.
Yes, sessionToken
is supported because it is an optional field of S3ClientConfig
IS3Auth