mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Fix the routing for the default OAuth2 pages
This commit is contained in:
parent
92cda20448
commit
092f0cfcaf
2 changed files with 13 additions and 1 deletions
|
|
@ -5,10 +5,11 @@ use Utopia\App;
|
||||||
|
|
||||||
App::get('/console/*')
|
App::get('/console/*')
|
||||||
->alias('/')
|
->alias('/')
|
||||||
|
->alias('auth/*')
|
||||||
->alias('/invite')
|
->alias('/invite')
|
||||||
->alias('/login')
|
->alias('/login')
|
||||||
->alias('/recover')
|
->alias('/recover')
|
||||||
->alias('/register')
|
->alias('/register/*')
|
||||||
->groups(['web'])
|
->groups(['web'])
|
||||||
->label('permission', 'public')
|
->label('permission', 'public')
|
||||||
->label('scope', 'home')
|
->label('scope', 'home')
|
||||||
|
|
|
||||||
|
|
@ -160,4 +160,15 @@ class HTTPTest extends Scope
|
||||||
$this->assertIsString($body['server-ruby']);
|
$this->assertIsString($body['server-ruby']);
|
||||||
$this->assertIsString($body['console-cli']);
|
$this->assertIsString($body['console-cli']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testDefaultOAuth2()
|
||||||
|
{
|
||||||
|
$response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/success', $this->getHeaders());
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response['headers']['status-code']);
|
||||||
|
|
||||||
|
$response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/failure', $this->getHeaders());
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response['headers']['status-code']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue