🔄 refactor(api_key/crud.py): change prefix of generated API key from "lf" to "sk" for better readability and consistency
This commit is contained in:
parent
6276e5c233
commit
3403ee3c1c
1 changed files with 1 additions and 1 deletions
|
|
@ -22,7 +22,7 @@ def create_api_key(
|
|||
session: Session, api_key_create: ApiKeyCreate, user_id: UUID
|
||||
) -> UnmaskedApiKeyRead:
|
||||
# Generate a random API key with 32 bytes of randomness
|
||||
generated_api_key = f"lf-{secrets.token_urlsafe(32)}"
|
||||
generated_api_key = f"sk-{secrets.token_urlsafe(32)}"
|
||||
|
||||
api_key = ApiKey(
|
||||
api_key=generated_api_key,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue