-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for OAuth login #1122
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Alexis Rico <sferadev@gmail.com>
🦋 Changeset detectedLatest commit: 6c6cc61 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Your pull request has been published to npm. You can install @xata.io/client by running:
Other packages are published like this:
To test the CLI, run:
|
size-limit report 📦
|
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Signed-off-by: Alexis Rico <sferadev@gmail.com>
Signed-off-by: Alexis Rico <sferadev@gmail.com> Co-authored-by: SferaDev <SferaDev@users.noreply.github.com> Co-authored-by: Alexis Rico <sferadev@gmail.com>
Co-authored-by: eminano <eminano@users.noreply.github.com>
Signed-off-by: Alexis Rico <sferadev@gmail.com>
} | ||
|
||
async getXataClient({ profile }: { profile?: Profile } = {}) { | ||
if (this.#xataClient) return this.#xataClient; | ||
|
||
const { apiKey, host } = profile ?? (await this.getProfile()); | ||
|
||
if (!apiKey) { |
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.
Should we still check whether the token is an empty string and log that error?
const currentProfile = await this.getProfile(); | ||
const domain = web || currentProfile?.web || 'https://app.xata.io'; | ||
|
||
return await loginWithWebUI(domain); |
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.
We no longer give them the option to create a new API key during login, it's done automatically on login now?
import { BaseCommand } from '../../base.js'; | ||
import { readCredentialsDictionary, saveCredentials } from '../../credentials.js'; | ||
|
||
export default class Refresh extends BaseCommand<typeof Refresh> { |
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.
When is this called?
Dismissing until we test it thoroughly
No description provided.