Skip to content

Conversation

Thodoris1999
Copy link
Contributor

Doesn't change any actual logic, but now the generated OpenAPI pages will treat the "password" and "client_secret" fields of OAuth2PasswordRequestForm as secret and show dots in the text field instead of plain text

@YuriiMotov
Copy link
Contributor

@Thodoris1999, thanks for your efforts!

Docs code examples has been updated and now there are some conflicts.
Would you like to resolve them?

@Thodoris1999
Copy link
Contributor Author

@Thodoris1999, thanks for your efforts!

Docs code examples has been updated and now there are some conflicts. Would you like to resolve them?

Aight - let me know if that looks good

Copy link
Contributor

@YuriiMotov YuriiMotov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Screenshot from 2025-06-12 10-00-41

Before changes, password field showed string

@YuriiMotov YuriiMotov changed the title OAuth2PasswordRequestForm: set OpenAPI format to password for fields password and client secret 🚸 Set format to password for fields password and client_secret in OAuth2PasswordRequestForm Jun 12, 2025
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you @Thodoris1999! 🚀

And thanks a lot @YuriiMotov for the review with screenshot and everything, that helps so much! 🙌

@tiangolo tiangolo changed the title 🚸 Set format to password for fields password and client_secret in OAuth2PasswordRequestForm 🚸 Set format to password for fields password and client_secret in OAuth2PasswordRequestForm, make docs show password fields for passwords Jun 17, 2025
@tiangolo tiangolo merged commit 30b9dfb into fastapi:master Jun 17, 2025
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants