File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 43
43
// Redirect to the registration page
44
44
function register ( ) {
45
45
const registration = new URL ( '/register' , location )
46
- registration . searchParams . set ( 'returnToUrl' , location )
47
46
location . href = registration
48
47
}
49
48
} ) ( solid )
Original file line number Diff line number Diff line change @@ -76,6 +76,17 @@ class UserAccount {
76
76
return parsed . protocol + '//' + parsed . host
77
77
}
78
78
79
+ /**
80
+ * Returns the Uri to the account's Pod
81
+ *
82
+ * @return {string }
83
+ */
84
+ get podUri ( ) {
85
+ const webIdUrl = url . parse ( this . webId )
86
+ const podUrl = `${ webIdUrl . protocol } //${ webIdUrl . host } `
87
+ return url . format ( podUrl )
88
+ }
89
+
79
90
/**
80
91
* Returns the URI of the WebID Profile for this account.
81
92
* Usage:
Original file line number Diff line number Diff line change @@ -314,8 +314,15 @@ class CreateOidcAccountRequest extends CreateAccountRequest {
314
314
} )
315
315
}
316
316
317
+ /**
318
+ * Generate the response for the account creation
319
+ *
320
+ * @param userAccount {UserAccount}
321
+ *
322
+ * @return {UserAccount }
323
+ */
317
324
sendResponse ( userAccount ) {
318
- let redirectUrl = this . returnToUrl || this . loginUrl ( )
325
+ let redirectUrl = this . returnToUrl || userAccount . podUri
319
326
this . response . redirect ( redirectUrl )
320
327
321
328
return userAccount
You can’t perform that action at this time.
0 commit comments