mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-28 15:40:20 +00:00
restored success/error redirects
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -143,7 +143,7 @@
|
||||
<dependency>
|
||||
<groupId>io.github.coffeelibs</groupId>
|
||||
<artifactId>tiny-oauth2-client</artifactId>
|
||||
<version>0.1.1</version>
|
||||
<version>0.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.auth0</groupId>
|
||||
|
||||
@@ -28,8 +28,9 @@ class AuthFlowTask extends Task<String> {
|
||||
|
||||
@Override
|
||||
protected String call() throws IOException, InterruptedException {
|
||||
// TODO configure redirectURIs with deviceId from authFlowContext
|
||||
var response = AuthFlow.asClient(hubConfig.clientId) //
|
||||
.withSuccessRedirect(URI.create(hubConfig.authSuccessUrl + "&device=" + authFlowContext.deviceId())) //
|
||||
.withErrorRedirect(URI.create(hubConfig.authErrorUrl + "&device=" + authFlowContext.deviceId())) //
|
||||
.authorize(URI.create(hubConfig.authEndpoint), redirectUriConsumer) //
|
||||
.getAccessToken(URI.create(hubConfig.tokenEndpoint));
|
||||
var json = JsonParser.parseString(response);
|
||||
|
||||
Reference in New Issue
Block a user