anyone else have this `authenticate` command worki...
# sdf
s
anyone else have this
authenticate
command working in WSL on windows?
m
unfortunately - no, only option for you to do so is installing XServer on windows, binding socket in WSL to point to Xserver, installing browser into WSL, etc...
I've faced the same issue running sdfcli inside docker
what I came up with is manually importing tokens into sdfcli using savetoken
sdfcli authenticate -savetoken -authid $authid -account $account -tokenid TOKEN_ID -tokensecret TOKEN_SECRET
s
that's a major bummer
I used to use
issuetoken
- would hate to see that functionality be broken in WSL come 2020.2
m
You won't be able to enjoy the SSO functionality from the inside of WSL
or docker
s
but thanks for the reply @mizax - I may have to resort to manually assigning tokens again and capturing as you show above.
issuetoken
prompts for login credentials - and works fine with WSL
m
if you wonder where this tokens stored - in $HOME/.suitecloud-sdk/credentials
Yes, but it shows this warning and gonna stop working in the next release
And, by the way, it allows you to specify only authid for all other commands, and also to store as many tokens as you wish
without swapping the credentials file for each issuetoken run
s
I generally only use one token per account. Not sure why one would use more than one?
Mostly I am using a token for a user with role 55 (the role installed by that SDF bundle)
m
I'm using one token for production and one for sandbox
s
yes, but those are different accounts so it's still 1 token per account?
m
Yes, I'm not sure, but as far as I can remember when I tried to
issuetoken
for sandbox after doing so for prod my token was replaced
But maybe I've messed something up
s
if you do a production refresh, it wipes out your tokens on sandbox.
m
Yes, I know that)
s
up till now that's easy to fix since
issuetoken
exists
I'm going to be sad to see a step backward in convenience with SDFCLI for 2020.2 in this regard.
imho, WSL is by far the premier 'bash' environment for windows, by windows.
maybe I'll switch back to linux entirely... heh (not really an option with corporate IT I fear)
m
The answer here is simple, run it from windows, not from WSL
s
that's not really simple - means I have to have the SDFCLI installed for windows, and Java?
it's supposed to be a command line tool - to force me to use a browser fundamentally breaks the commandline aspect of sdfcli
m
yes, and if you have any scripts around it, you should rewrite it to batch or powershell
s
yeah, no thanks.
I don't see me going back to powershell - web development is owned by
bash
prompts
but I appreciate your advice!
m
The shoud've probably printed some link that you can copy-paste to the browser and authenticate there, and then your CLI could retrieve tokens
That's how it's usually made for cli tools
you're welcome
a
@stalbert @mizax we are going to look into it. Thanks for bringing this up. Will reach out you if i have some questions regarding this.
s
thanks @Ali Syed (NS DevTools QA)
m
Thanks 🙂