logto icon indicating copy to clipboard operation
logto copied to clipboard

feature request: api to create first management m2m application

Open sskyy opened this issue 1 year ago • 4 comments

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.

sskyy avatar Jan 05 '24 07:01 sskyy

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 avatar Jan 05 '24 10:01 darcyYe

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!

darcyYe avatar Jan 17 '24 10:01 darcyYe

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.

sskyy avatar Jan 22 '24 09:01 sskyy

No problem, take your time!

darcyYe avatar Feb 01 '24 08:02 darcyYe