mirror of
https://github.com/YunoHost-Apps/element_ynh.git
synced 2024-09-03 18:36:08 +02:00
Fix issue #11 SSO auth brocken
This commit is contained in:
parent
c6442dfe01
commit
5bed08895d
2 changed files with 5 additions and 1 deletions
|
@ -49,6 +49,9 @@ install_source() {
|
|||
a=${a//'*'/'\*'}
|
||||
}
|
||||
|
||||
# We get the name of the Lifecycle objet
|
||||
Lifecycle_object_name=$(egrep -o "onLoggedIn:\w+\.setLoggedIn," bundle.js $final_path/bundles/*/bundle.js | egrep -o ":\w+\." | egrep -o "\w")
|
||||
|
||||
# We get the part witch we need to patch and create a regular expression
|
||||
a='case"start_login":this.setStateForNewView({view:unnamed_object.LOGIN}),this.notifyNewScreen("login");break;'
|
||||
escape_string
|
||||
|
@ -58,6 +61,7 @@ install_source() {
|
|||
a="$(cat ../sources/bundle_patch.js)"
|
||||
escape_string
|
||||
a="${a//'unnamed_object'/'\1'}"
|
||||
a="${a//'Lifecycle'/$Lifecycle_object_name}"
|
||||
a="$(echo "$a" | sed -r "s|//.*||g")"
|
||||
replace_string="$(echo $a)"
|
||||
sed --in-place -r "s|$match_string|$replace_string|g" $final_path/bundles/*/bundle.js
|
||||
|
|
|
@ -11,7 +11,7 @@ case "start_login":
|
|||
console.log(this.response);
|
||||
|
||||
if ((xhr.status == '200') && this.response.accessToken) {
|
||||
H.setLoggedIn(this.response);
|
||||
Lifecycle.setLoggedIn(this.response);
|
||||
thisobject.setStateForNewView({
|
||||
view: unnamed_object.LOGGING_IN
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue