# 允许用户API密钥客户端注册有效的auth\_redirect的可行性

**URL:** <https://meta.discourse.org/t/feasibility-of-allowing-a-user-api-key-client-to-register-a-valid-auth-redirect/312901>\
**Category:** Development\
**Created:** [2024 年6 月 20 日 16:01 UTC](https://meta.discourse.org/t/feasibility-of-allowing-a-user-api-key-client-to-register-a-valid-auth-redirect/312901 "2024-06-20T16:01:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
发布日期： [2024 年6 月 21 日 18:54 UTC](https://meta.discourse.org/t/feasibility-of-allowing-a-user-api-key-client-to-register-a-valid-auth-redirect/312901/2 "2024-06-21T18:54:08Z")

</div>

总的来说，我赞成这样做，因为它可以在不给管理员带来太多麻烦的情况下，在 ActivityPub 插件及其他插件中实现用户授权工作流。

不过，有一些问题：

> [@angus](#):
>
> `client_id` 和 `application_name` 从 `user_api_key` 迁移而来

我不太喜欢这里的迁移，我宁愿保持现有的用户 API 密钥不变，因为单个用户密钥的 ID 和名称独立于注册客户端的 ID 和名称。也许我们可以为 `user_api_key` 添加一个 `user_api_key_client_id` 列。然后，带有关联客户端的密钥可以使用客户端配置的重定向（当然，现有密钥也保留当前行为）。

此外，管理员是否应该能在某个地方查看注册客户端列表？

---

_[View the full topic](https://meta.discourse.org/t/feasibility-of-allowing-a-user-api-key-client-to-register-a-valid-auth-redirect/312901)._
