Current look of the OAuth dialog with JS:
Without JS:
The JS version creates a jQuery UI dialog and puts the form inside it. jQuery UI is deprecated and should be replaced with OOUI.
The existing OOUI dialogs look similar so we need a new dialog class. It could be something generic that puts a HTMLForm into a dialog, or something specific for OAuth (the eventual design is supposed to be more complex - see T75062 - so maybe that needs custom logic).