Skip to content
Snippets Groups Projects
Commit fb96256c authored by Michiel de Jong's avatar Michiel de Jong
Browse files

offer login popup from oauth dialog

parent d0746d7e
No related branches found
No related tags found
No related merge requests found
...@@ -100,9 +100,16 @@ if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'unhosted' ...@@ -100,9 +100,16 @@ if(count($pathParts) >= 8 && $pathParts[0] == '' && $pathParts[2] == 'unhosted'
$token=OC_UnhostedWeb::createDataScope($appUrl, $userAddress, $dataScope); $token=OC_UnhostedWeb::createDataScope($appUrl, $userAddress, $dataScope);
header('Location: '.$_GET['redirect_uri'].'#access_token='.$token.'&token_type=unhosted'); header('Location: '.$_GET['redirect_uri'].'#access_token='.$token.'&token_type=unhosted');
} else { } else {
if($_SERVER['HTTPS']){
$url = "https://";
} else {
$url = "http://";
}
$url .= $_SERVER['SERVER_NAME'];
$url .= substr($_SERVER['SCRIPT_NAME'], 0, -strlen('apps/unhosted/compat.php'));
die('Please ' die('Please '
.'<input type="submit" onclick="' .'<input type="submit" onclick="'
."window.open('https://myfavouritesandwich.org:444/','Close me!','height=600,width=300');" ."window.open('$url','Close me!','height=600,width=300');"
.'" value="log in">' .'" value="log in">'
.', close the pop-up, and ' .', close the pop-up, and '
.'<form method="POST"><input name="allow" type="submit" value="Try again"></form>'); .'<form method="POST"><input name="allow" type="submit" value="Try again"></form>');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment