Open betterphp opened 1 year ago
Also applies to 6.6.0 on windows and 6.5.2 on macOS. Here login is also not possible with custom oAuth provider configured in Rocket.Chat and with die pre-configured Nextcloud-oAuth settings.
The same thing happens on 6.6.0 for me too (AppImage on Linux)
I am getting the same behavior with my setup on Windows with 6.6.0
Same issue here, on Mac:
you can right-click on the link and choose "Open link in Ferdium" - this is different from the setting.
you can right-click on the link and choose "Open link in Ferdium" - this is different from the setting.
Sorry to say, but that does not help here.
I analyzed Rocket.Chat's login page when using CAS:
<a>
, but a <button type="button">
<form>
have an action. The button seems to be bubbling to the <body>
element.In Rocket.Chat's source, I found in openCASLoginPopup.ts the function openCenteredPopup
, which opens the login window:
const newwindow = window.open(url, 'Login', features);
if (!newwindow) {
throw new Error('Could not open popup');
}
newwindow.focus();
return newwindow;
Would it be feasible to use user.js
to replace the button with a real link? Or does this need another approach?
user.js
method, but again, i can't comment whether it would work or not.Also, please upgrade to the latest version before trying - so that we are all on the same page when referring to inconsistent behavior of the app
I've found this hacky workaround waiting for issue to be resolved (I sadly have not time to give and almost no knowledge in Ferdium recipes baking...) :
Meteor.loginToken
from Local Storage
:
localStorage.getItem("Meteor.loginToken")
Local Storage
:
localStorage.setItem("Meteor.loginToken", "token")
Hope it helps !
Great workaround @remche ! Thank you !
If you want to have autologin when you open Ferdium, you can edit Rocket.Chat service, then at bottom "Open user.js" and put this code :
module.exports = (config, Ferdium) => {
// Write your scripts here
console.log("Hello, World!", config);
if (config.url.includes("your.rocket.chat.host.net")) {
localStorage.setItem("Meteor.loginToken", "your-token");
}
};
You can also create a personal access token that don't expire (on your Rocket.Chat host at /account/tokens
path) instead of retrieving it on your browser :)
Avoid duplicates
Ferdium Version
6.5.2 (AppImage)
What Operating System are you using?
Ubuntu
Operating System Version
Ubuntu 23.04
What arch are you using?
x64
Last Known Working Ferdium version
No response
Expected Behavior
The login window should open in the app and the oAuth process should complete
Actual Behavior
The login window opens in Firefox (even with the open URLs in Ferdium setting enabled) which means there's no way to sign in.
Steps to reproduce
Debug link
No response
Screenshots
https://github.com/ferdium/ferdium-app/assets/788007/8ffec657-69f9-485d-a4f6-b717b0acfea9
Additional information
No response