Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create first admin user with environment variables at deploy time #9204

Closed
lazyest opened this issue Dec 23, 2024 · 9 comments
Closed

Create first admin user with environment variables at deploy time #9204

lazyest opened this issue Dec 23, 2024 · 9 comments

Comments

@lazyest
Copy link

lazyest commented Dec 23, 2024

Scope & Context

At initial deployment phase there is no clear way to create admin user

Current behavior

Currently as far as I see there is no way to create new user except of WebUI

Expected behavior

Will be useful to have a kind of variables AUTH_USER/AUTH_PASSWORD to create first user in deploy time. Alternatively if there is a CLI way to do exactly same things, please mention it in documentation more dedicated. Thanks

@BOHEUS
Copy link
Contributor

BOHEUS commented Dec 23, 2024

At deployment, there is a default user with credentials tim@apple.dev/Applecar2025 which are present in documentation but also pre-filled (assuming SIGN_IN_PREFILLED=true is present in .env file)

@lazyest
Copy link
Author

lazyest commented Dec 24, 2024

this is better then nothing but maybe there is a way to do exactly new user as declared in environment? Or at least to plan it doing this way

@BOHEUS
Copy link
Contributor

BOHEUS commented Dec 24, 2024

I don't know about the way to overwrite first user credentials nor do I know about the plans to make it

@lazyest
Copy link
Author

lazyest commented Dec 24, 2024

btw SIGN_IN_PREFILLED=true didnt work for me, its anyhow asking for creating new user
tried both setting it in env and directly in docker-compose for server container

@FelixMalfait
Copy link
Member

Hey, what's the use-case for this? Maybe there are options but it's hard to tell without context.
Is it for a server with a single workspace? Will every user have an email address with the same domain name?
Thanks!

@lazyest
Copy link
Author

lazyest commented Jan 7, 2025

I prefer to have at least server-wide option

My intention is to have way to deploy ready-to-use app for providing login details only to some external user with machine up and running and waiting for user to login.

@FelixMalfait
Copy link
Member

So you've got 1 server with a multi-tenant setup, or multiple server with 1 tenant on each?
Why not use the API? On the cloud we have the captcha guard but on a self-hosted instance there should be any issue. You can make the same GraphQL call we use to create users on the frontend for every new user/workspace you want to provision?

@lazyest
Copy link
Author

lazyest commented Jan 8, 2025

single self hosted server I want to provide to less advanced person with kind of credentials to access is my goal
honestly I didnt get simple way to use API for that, thats why I'm asking

@FelixMalfait
Copy link
Member

Open the network tab when you signup and you'll see the graphql calls, you can just re-use them :)

You can also play around with the graphql console https://twenty.com/developers/graphql/core

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in 🎯 Roadmap & Sprints Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants