Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Instructions for finding account_id only work if you have a zone #1364

Closed
kentonv opened this issue Jun 5, 2020 · 11 comments · Fixed by #1395
Closed

Instructions for finding account_id only work if you have a zone #1364

kentonv opened this issue Jun 5, 2020 · 11 comments · Fixed by #1395
Milestone

Comments

@kentonv
Copy link
Member

kentonv commented Jun 5, 2020

When you generate a new project, Wrangler writes:

You can find your account_id and zone_id in the right sidebar of the zone overview tab at https://dash.cloudflare.com

This only works if you have a zone, but if you're using workers.dev exclusively, then you don't have any zone pages and so the mentioned sidebar doesn't show up anywhere.

I couldn't find anywhere in the UI that showed my account ID in this case. However, the account ID does appear in the URL.

@EverlastingBugstopper
Copy link
Contributor

mm - we should update to point them to the account-level workers page. i believe it's on the right panel in that case

@ashleymichal
Copy link
Contributor

correct. but also more than likely this belongs in docs.

@kentonv
Copy link
Member Author

kentonv commented Jun 5, 2020

Huh somehow I missed that the account ID shows up on the Workers page. I thought I looked there.

but also more than likely this belongs in docs.

Docs are great, but they wouldn't be a replacement for this message.

@ashleymichal
Copy link
Contributor

i'm a dingus and thought you were talking about the readme. saying "account home" is probably ideal.

@kentonv
Copy link
Member Author

kentonv commented Jun 5, 2020

Problem is that the account home doesn't actually have your account ID on it. :(

It looks like we can't directly link to the worker page either, unless we already know the user's account ID... ugh.

This will all be solved when we support an OAuth flow for configuration, of course...

@EverlastingBugstopper
Copy link
Contributor

mm - i dont think it'll be solved with oauth since you'll still need to specify account + zone id.

also - don't we have deeplinks or something? cc @neynah

@kentonv
Copy link
Member Author

kentonv commented Jun 5, 2020

With OAuth, presumably you'd type wrangler login or whatever and then it would open a tab in your browser where you select which account you want, etc. No need to tell people to hunt for an ID to copy/paste...

@EverlastingBugstopper
Copy link
Contributor

hmm. yeah - we dont store account_id or zone_id globally since folks often have more than one of each, so they are per-project configuration instead of global configuration like your api key. would probably be nice to spit out list of available account ids when you would run wrangler login like we do now with wrangler whoami

@kentonv
Copy link
Member Author

kentonv commented Jun 5, 2020

Ohhh, I didn't know about wrangler whoami. Maybe this message here should really direct people to run that. It's much easier than digging around in the dashboard for an account ID...

I guess it's a little weird that our config file mixes deployment information with source code... seems like that makes it hard to, say, have an open source worker on github that anyone can deploy to their own account. Wonder if it makes sense to put account ID and script name in a separate file that could optionally not be checked in, or something.

@ashleymichal
Copy link
Contributor

wrangler whoami

yas

I guess it's a little weird that our config file mixes deployment information with source code... seems like that makes it hard to, say, have an open source worker on github that anyone can deploy to their own account. Wonder if it makes sense to put account ID and script name in a separate file that could optionally not be checked in, or something

this has definitely introduced issues. i think wrangler login and whoami could be instrumental in fixing this problem

@EverlastingBugstopper
Copy link
Contributor

agreed @kentonv - i think we should definitely think about ways to better support per-developer settings that dont get checked in to version control.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants