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

Support SSO authentication in zesty auth login command #133

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
update APIs to prod
  • Loading branch information
Matthew Ezra Labre authored and Matthew Ezra Labre committed Jun 29, 2023
commit 7381031e4f48e75281907c5d51bed6079af3b1fa
6 changes: 3 additions & 3 deletions src/authenticated-command.ts
Original file line number Diff line number Diff line change
@@ -24,8 +24,8 @@ export async function GetUserToken(path: string) {

export function InitSDK(token: string) {
return new SDK('', token, {
accountsAPIURL: "https://accounts.api.dev.zesty.io/v1",
authURL: "https://auth.api.dev.zesty.io",
accountsAPIURL: "https://accounts.api.zesty.io/v1",
authURL: "https://auth.api.zesty.io",
// instancesAPIURL: "https://INSTANCE_ZUID.api.zesty.io/v1",
// mediaAPIURL: "https://svc.zesty.io",
})
@@ -43,7 +43,7 @@ export default abstract class extends Command {
const token = await GetUserToken(this.config.configDir)

const auth = new SDK.Auth({
authURL: "https://auth.api.dev.zesty.io",
authURL: "https://auth.api.zesty.io",
})
const valid = await auth.verifyToken(token)

2 changes: 1 addition & 1 deletion src/commands/auth/login.ts
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ export default class Login extends Command {
failedSSOAuthentication: boolean | undefined

async run(): Promise<void> {
const authURL = "https://auth.api.dev.zesty.io"
const authURL = "https://auth.api.zesty.io"
const { args } = await this.parse(Login)
let { service } = args

2 changes: 1 addition & 1 deletion src/commands/auth/signup.ts
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ export default class Signup extends Command {
try {
CliUx.ux.action.start('Creating your account')

const res = await fetch(`https://accounts.api.dev.zesty.io/v1/users`, {
const res = await fetch(`https://accounts.api.zesty.io/v1/users`, {
method: 'POST',
headers: {
"Content-Type": "application/json"