diff --git a/frontend/src/components/Oauth2Auth.jsx b/frontend/src/components/Oauth2Auth.jsx index 627696e7..e63ee93c 100644 --- a/frontend/src/components/Oauth2Auth.jsx +++ b/frontend/src/components/Oauth2Auth.jsx @@ -49,6 +49,8 @@ const MenuProps = { scrollX: "auto", }, }, + variant: "menu", + getContentAnchorEl: null, }; const AuthenticationOauth2 = (props) => { @@ -84,6 +86,7 @@ const AuthenticationOauth2 = (props) => { const [oauthUrl, setOauthUrl] = React.useState(""); const [buttonClicked, setButtonClicked] = React.useState(false); const [selectedScopes, setSelectedScopes] = React.useState([]); + const [offlineAccess, setOfflineAccess] = React.useState(true); const allscopes = authenticationType.scope !== undefined ? authenticationType.scope : []; @@ -113,6 +116,10 @@ const AuthenticationOauth2 = (props) => { var resources = ""; if (scopes !== undefined && (scopes !== null) & (scopes.length > 0)) { + if (offlineAccess === true && !scopes.includes("offline_access")) { + scopes.push("offline_access") + } + resources = scopes.join(" "); //resources = scopes.join(","); } @@ -496,34 +503,47 @@ const AuthenticationOauth2 = (props) => { }} /> {allscopes.length === 0 ? null : ( - - Scopes - - +