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 4343 // Redirect to the registration page
4444 function register ( ) {
4545 const registration = new URL ( '/register' , location )
46- registration . searchParams . set ( 'returnToUrl' , location )
4746 location . href = registration
4847 }
4948} ) ( solid )
Original file line number Diff line number Diff line change @@ -76,6 +76,17 @@ class UserAccount {
7676 return parsed . protocol + '//' + parsed . host
7777 }
7878
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+
7990 /**
8091 * Returns the URI of the WebID Profile for this account.
8192 * Usage:
Original file line number Diff line number Diff line change @@ -309,8 +309,15 @@ class CreateOidcAccountRequest extends CreateAccountRequest {
309309 } )
310310 }
311311
312+ /**
313+ * Generate the response for the account creation
314+ *
315+ * @param userAccount {UserAccount}
316+ *
317+ * @return {UserAccount }
318+ */
312319 sendResponse ( userAccount ) {
313- let redirectUrl = this . returnToUrl || this . loginUrl ( )
320+ let redirectUrl = this . returnToUrl || userAccount . podUri
314321 this . response . redirect ( redirectUrl )
315322
316323 return userAccount
You can’t perform that action at this time.
0 commit comments