File tree Expand file tree Collapse file tree 3 files changed +16
-22
lines changed
Expand file tree Collapse file tree 3 files changed +16
-22
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ async def __oauth(self, request: Request) -> None:
167167 if not self .__auth_manager .oauth_manager .valid_provider (provider ):
168168 raise HTTPNotFound (reason = "Unknown provider %s" % provider )
169169
170- redirect_url = request .url .with_path (f"/api/auth/oauth/callback/{ provider } " ).with_scheme ('https' )
170+ redirect_url = request .url .with_path (f"/api/auth/oauth/callback/{ provider } / " ).with_scheme ('https' )
171171 oauth_cookie = request .cookies .get (_COOKIE_OAUTH_SESSION , "" )
172172
173173 is_valid_session = await self .__auth_manager .oauth_manager .is_valid_session (provider , oauth_cookie )
Original file line number Diff line number Diff line change 4242
4343
4444# =====
45- class AuthManager : # pylint: disable=too-many-instance-attributes
46- def __init__ ( # pylint: disable=too-many-arguments
47-
48-
4945@dataclasses .dataclass (frozen = True )
5046class _Session :
5147 user : str
Original file line number Diff line number Diff line change @@ -54,24 +54,22 @@ export function main() {
5454}
5555
5656function __loadProviders ( ) {
57- let http = tools . makeRequest ( "GET" , "/api/auth/oauth/providers" , function ( ) {
58- if ( http . readyState === 4 ) {
59- if ( http . status === 200 ) {
60- let oauthInfo = JSON . parse ( http . responseText ) . result ;
61- if ( ! oauthInfo . enabled ) {
62- return ;
63- }
64- let buttons = `<tr>
65- <td colspan="2">
66- <hr>
67- </td>
68- </tr>
69- <tr><td> </tr></td>`
70- for ( const [ short_name , long_name ] of Object . entries ( oauthInfo . providers ) ) {
71- buttons += __makeProvider ( short_name , long_name ) ;
72- }
73- $ ( "oauth-tbody" ) . innerHTML = buttons
57+ tools . httpRequest ( "GET" , "/api/auth/oauth/providers" , null , function ( http ) {
58+ if ( http . status === 200 ) {
59+ let oauthInfo = JSON . parse ( http . responseText ) . result ;
60+ if ( ! oauthInfo . enabled ) {
61+ return ;
62+ }
63+ let buttons = `<tr>
64+ <td colspan="2">
65+ <hr>
66+ </td>
67+ </tr>
68+ <tr><td> </tr></td>`
69+ for ( const [ short_name , long_name ] of Object . entries ( oauthInfo . providers ) ) {
70+ buttons += __makeProvider ( short_name , long_name ) ;
7471 }
72+ $ ( "oauth-tbody" ) . innerHTML = buttons
7573 }
7674 } )
7775}
You can’t perform that action at this time.
0 commit comments