alfred-gcloud-shortcuts
alfred-gcloud-shortcuts copied to clipboard
Support for multiusers
Hello there,
I was wondering if there's any chance we can handle multiple users. I have multiple gmail accounts each for one project and for a different access. So my urls would be
https://console.cloud.google.com/bigquery?authuser=0&project=X
https://console.cloud.google.com/bigquery?authuser=2&project=Y
Any ideas ?
Hi, that is a good question. Sorry I haven't seen this issue until now.
I guess it would be possible to add a config option where we could register user:authuser pairs. And if more than one pair exists then the workflow will ask which user you want to use before opening a service.
What do you think?
Preferably we should support multiple authenticated gcloud accounts as well, and somehow map each user to an authuser ID so the browser opens everything in the correct context.
Hey ! No worries this is not an urgent matter ;)
Thanks a lot for your answer and your proposition of solution. And tbh I think it's the right one. Maybe should we have a default one even if multiple pairs are configured to avoid typing the same number even 60% of the time. What do you think ?
Otherwise I guess the mapping seems good to me !
Cheers from france 👋
There is the possibility of adding a default authuser argument in the configuration as of now. This will append the authuser (default to 0) to all URLs which define this property. If you in 90% of the cases just need to use a specific account then this might be a solution for the short term.
I generally avoid this problem by using multiple chrome profiles which are all logged into their respective GCP account. Ensuring that the browser profile you want to use is in focus before launching a product from Alfred has been working well for me. It might be a different flow for you than you're used to, but for me this means I've never had the need to specify an authuser in this workflow.
Could that be a potential workaround for you?
Cheers from Norway 👋 🇳🇴
Thanks a lot for this clear and detailled answer ! I'm actually the one responsible for you implementing the authuser feature 😅 (thanks again for that that helped me a looot since then).
Tbh I'm more around 50/50 so I guess the registration of the user:authuser pair seems to be the best solution.
What do you think ?
👋 🇫🇷
I think such a solution could work well. As I see it this feature should be optional and only visible if you've manually configured these pairs.
I do not think I have time to start working on such a feature in the near future. If you're able to take a stab at it and create a PR that would be great!
We could reuse the authuser
argument and allow comma separated values personal=1,work=2
where these options would be represented before opening a URL if and only if more than one option is available.
In order to not break anything for existing users the argument must support 1,2,3
as well as a mix 1,work=2,3
.
this feature should be optional and only visible if you've manually configured these pairs 100% agree with you !
Tbh I've never written any Golang in my life so not sure I'll be able to submit a viable PR anytime soon. However, I'll try to work on this PR as a good way to learning Golang :)
Thanks a lot for taking the time to answer the comments and hopefully we'll have this new feature by this summer 😀
Take care !