Skip to content

Commit 496595a

Browse files
committed
Update auth command to retrieve bag and pass custom endpoint to auth API
1 parent 7765fd5 commit 496595a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cmd/auth.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,16 @@ func loginCmd() *cobra.Command {
8383
Str("authCode", util.IfEmpty(authCode, "<nil>")).
8484
Msg("logging in")
8585

86+
bag, err := dependencies.AppStore.Bag(appstore.BagInput{})
87+
if err != nil {
88+
return fmt.Errorf("failed to get bag: %w", err)
89+
}
90+
8691
output, err := dependencies.AppStore.Login(appstore.LoginInput{
8792
Email: email,
8893
Password: password,
8994
AuthCode: authCode,
95+
Endpoint: bag.AuthEndpoint,
9096
})
9197
if err != nil {
9298
if errors.Is(err, appstore.ErrAuthCodeRequired) && !interactive {

0 commit comments

Comments
 (0)