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

Auth #9

Merged
merged 8 commits into from
May 20, 2024
Merged

Auth #9

merged 8 commits into from
May 20, 2024

Conversation

afshin
Copy link
Member

@afshin afshin commented May 14, 2024

  • Adds a new plugin that provides IS3Auth
  • Removes default activation plugin
  • Refactors the two remaining plugins somewhat

@afshin afshin marked this pull request as ready for review May 17, 2024 14:12
@afshin afshin added the enhancement New feature or request label May 17, 2024
@afshin
Copy link
Member Author

afshin commented May 17, 2024

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
Comment on lines 87 to 88
accessKeyId: 'abcdefghijklmnopqrstuvwxyz',
secretAccessKey: 'SECRET123456789abcdefghijklmnopqrstuvwxyz'
Copy link
Member

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,
  },
})

Copy link
Member Author

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

@afshin afshin merged commit d7e7803 into QuantStack:main May 20, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants