Skip to content

Please restore support for login with environment variables #2293

Closed

Description

@mleu

Short description of the problem:

Logging into ionic services (package, upload etc) does not work anymore with environment variables IONIC_EMAIL and IONIC_PASSWORD set.

What behavior are you expecting?

The CLI continues supporting settings environment variables to read off the email and password for the user.

Steps to reproduce:

  1. remove pre-existing credentials with rm -Rf $HOME/.ionic or similar
  2. export environment variables IONIC_EMAIL=... and IONIC_PASSWORD=...
  3. use a command which needs credentials, like ionic package list
ERROR] Oops, sorry! You'll need to log in:
        
            ionic login
        
        You can create a new account by signing up:
        
            ionic signup

Post the output of ionic info below please

global packages:

    @ionic/cli-utils : 1.0.0
    Ionic CLI        : 3.0.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-ionic-angular : 1.0.0
    Ionic Framework                 : ionic-angular 3.2.1

System:

    Node       : v6.9.1
    OS         : Linux 4.10
    Xcode      : not installed
    ios-deploy : not installed
    ios-sim    : not installed

Other information:
Commit removing the information from README.md was 6ac4dae#diff-04c6e90faac2675aa89e2176d2eec7d8L256

Activity

  1. changed the title [-]Please restore login with environment variables IONIC_EMAIL & IONIC_PASSWORD[/-] [+]Please restore support for login with environment variables[/+] on May 15, 2017
  2. imhoffd commented on May 16, 2017

    @imhoffd
    Contributor

    @mleu It would be good to support this in a future release. I would prefer having the user set an IONIC_TOKEN for authentication rather than storing passwords, but we can offer discouraged support for IONIC_EMAIL and IONIC_PASSWORD.

  3. added this to the CLI Future milestone on May 16, 2017
  4. mleu commented on May 16, 2017

    @mleu
    Author

    @dwieeb Thanks for the feedback! Yes, a IONIC_TOKEN would be even better. 👍

    Our current workaround is just calling ionic login "$IONIC_EMAIL" "$IONIC_PASSWORD" from our scripts.

  5. modified the milestones: , CLI Future on May 16, 2017
  6. imhoffd commented on May 19, 2017

    @imhoffd
    Contributor

    @mleu Automatic login via IONIC_EMAIL and IONIC_PASSWORD will be in the next release. Thanks!

  7. timbru31 commented on Jun 8, 2017

    @timbru31

    @dwieeb what about a TOKEN over email/password? Should I create an extra issue?

  8. imhoffd commented on Jun 8, 2017

    @imhoffd
    Contributor

    @timbru31 If you like. I don't know when I'll be able to take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions