logto-io / logto

🧑‍🚀 The better identity infrastructure for developers and the open-source alternative to Auth0.
https://logto.io
Mozilla Public License 2.0
8.74k stars 438 forks source link

feature request: api to create first management m2m application #5202

Open sskyy opened 10 months ago

sskyy commented 10 months ago

What problem did you meet?

When deploying logto alongside my business system, I wish to perform initial data import tasks using scripts during the installation phase. This includes actions like creating several basic users and modifying the login page information of logto. However, since logto's management m2m application must be manually created in the console, I cannot complete these tasks in a unified script.

Describe what you'd like Logto to have

I hope an API could be provided that allows the creation of the first management m2m application using the initial admin account and password. This would enable me to continue the initialization process through the API of this m2m application.

darcyYe commented 10 months ago

I think this is a solid use case. Here's a potential solution: we use the CLI in Logto to seed a new database. We can add an option in the CLI for seeding the database to selectively generate a Machine-to-Machine (M2M) app with Management API permissions. This way, you can also use this app to call the Management API and create some initial users as you mentioned. Let us know if this can make your setup smooth without manual operations.

darcyYe commented 9 months ago

Hi @sskyy , how do you like the previously mentioned solution? Our engineers are currently fully engaged in other development work and, unfortunately, won't be able to implement this feature request in recent days. However, if you find the mentioned solution suitable and are willing to contribute, your involvement would be highly appreciated and warmly welcomed!

sskyy commented 9 months ago

Hi @sskyy , how do you like the previously mentioned solution? Our engineers are currently fully engaged in other development work and, unfortunately, won't be able to implement this feature request in recent days. However, if you find the mentioned solution suitable and are willing to contribute, your involvement would be highly appreciated and warmly welcomed!

It looks good to me. But I'm not sure if I have time to contribute currently.

darcyYe commented 9 months ago

No problem, take your time!