You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Login via API token instead of email/password combo #2410
Description:
It's possible to login to Ionic via the env variables IONIC_EMAIL and IONIC_PASSWORD.
For e.g. CI and other use cases a login via an API token would be the better option, but currently there is no support to authenticate via a token.
Steps to Reproduce:
n/a
Output:
n/a
My ionic info:
❯ ionic info [10:00:49]
[WARN] You are not in an Ionic project directory. Project context may be missing.
global packages:
@ionic/cli-utils : 1.3.0
Ionic CLI : 3.3.0
System:
Node : v8.1.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : not installed
ios-sim : not installed
@timbru31 For this to work for the "Ionic Cloud" services (https://apps.ionic.io), you'd need to use the "appUser" token type for a single app listed in ~/.ionic/config.json. One token could only work on one app, which isn't really a problem for CI, but it'd be an annoyance for local development.
Activity
imhoffd commentedon Aug 2, 2017
@timbru31 For this to work for the "Ionic Cloud" services (https://apps.ionic.io), you'd need to use the "appUser" token type for a single app listed in
~/.ionic/config.json. One token could only work on one app, which isn't really a problem for CI, but it'd be an annoyance for local development.Still worth it?
imhoffd commentedon Sep 22, 2017
This works better with Ionic Pro! There is just one token.
imhoffd commentedon Oct 10, 2017
Waiting on some server changes before this gets in.
feat(auth): IONIC_TOKEN environment variable support
feat(session): automatic login with IONIC_TOKEN
timbru31 commentedon Jan 17, 2018
Awesome that this is added, thanks a lot @dwieeb - but where can I find/generate API tokens for Ionic Pro?
imhoffd commentedon Jan 18, 2018
@timbru31 Apologies, I'll have more documentation for this for the actual CLI v4 release.
You can find your token (once logged in with
ionic login) with this command:ionic config get -g tokens.user(exclude the quotes, of course).