-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google oauth handler using an external Python script #345
base: master
Are you sure you want to change the base?
Conversation
Tested this on
No issues while sigining up, loads all events. Thank you |
I prefer this solution to the golang one. I assume the golang binary would run in any distro but I wouldn't be able to confirm that. I was apprehensive of depending on the executable dataengine for both of these PRs as I wasn't sure if all dataengines were being removed in Plasma6 though. Seems that there's going to be a Plasma5Support package to keep them around for the short term though. I'd originally planned to rewrite all of the the google api request code in python, but the golang PR made me realize that was overkill. Thank you both for the simpler solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can comment/fix these after merging. Still need to test this code before merging it.
b"OAuth redirect handled successfully. You can close this tab now." | ||
) | ||
raise SystemExit(0) | ||
self.wfile.write(b"Missing code parameter in redirect.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the path of this file? Or is it stdout? or stderr? Is there a reason for using write instead of print()
(no newline)?
https://docs.python.org/3/library/http.server.html#http.server.BaseHTTPRequestHandler.wfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've cloned this repo and installed it, but when trying to sign in to google, I keep getting the issue as previous. How do we use the python script to log in? |
Installed this version and can confirm it works like a charm. |
Did you switch to google-calendar-fix branch? |
Well, do I fell dumb or what 🤣 |
Ok, I tried that, and still doesn't work. Just keeps coming up with the same error. What am I not doing correctly? |
Try Clean Install. Remove Old plasmoid rm -rf ~/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar And then install updated one. |
Nope, used that, still get the same. I give up! Thanks for your help thought |
@dodo-the-dev If you had installed via distro's package manager, it might be installed system wide in In that case, you may have to remove it from rm -rf ~/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar
sudo rm -rf /usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar And then install it from gaganpreet:google-calendar-fix You can give this a try if you wish to 👍 |
Oh wow, I didn't have anything in those folders, so I downloaded the Zip instead of the github and it worked first time. Not sure why, but thanks |
Works for me on fedora 38, Plasma 5.27.5 |
@gaganpreet Could you make this changes also for v68 branch? I tried to add them manually to that branch but then I got error 401 invalid client or client not found. I need v68 branch because of this: |
@Zren and when this pull request will be merged? :) |
Hi @Zren, just wanted to let you know that I tested @gaganpreet's solution via python script and it works on my system! rm -rf ~/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar
sudo rm -rf /usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar
git clone https://github.com/gaganpreet/plasma-applet-eventcalendar eventcalendar
cd eventcalendar
git switch google-calendar-fix
git pull
sh ./install System Specs: `.:/ossyyyysso/:. neil@FractalNorth
.:oyyyyyyyyyyyyyyyyyyo:` -----------------
-oyyyyyyyodMMyyyyyyyysyyyyo- OS: Kubuntu 22.04.2 LTS x86_64
-syyyyyyyyyydMMyoyyyydmMMyyyyys- Kernel: 5.19.0-43-generic
oyyysdMysyyyydMMMMMMMMMMMMMyyyyyyyo Uptime: 1 hour, 30 mins
`oyyyydMMMMysyysoooooodMMMMyyyyyyyyyo` Packages: 2490 (dpkg), 19 (flatpak), 9 (snap)
oyyyyyydMMMMyyyyyyyyyyyysdMMysssssyyyo Shell: bash 5.1.16
-yyyyyyyydMysyyyyyyyyyyyyyysdMMMMMysyyy- Resolution: 1920x1080
oyyyysoodMyyyyyyyyyyyyyyyyyyydMMMMysyyyo DE: Plasma 5.24.7
yyysdMMMMMyyyyyyyyyyyyyyyyyyysosyyyyyyyy WM: KWin
yyysdMMMMMyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy WM Theme: Sweet-Dark-transparent
oyyyyysosdyyyyyyyyyyyyyyyyyyydMMMMysyyyo Theme: [Plasma], Breeze [GTK2/3]
-yyyyyyyydMysyyyyyyyyyyyyyysdMMMMMysyyy- Icons: candy-icons [Plasma], candy-icons [GTK2/3]
oyyyyyydMMMysyyyyyyyyyyysdMMyoyyyoyyyo Terminal: konsole
`oyyyydMMMysyyyoooooodMMMMyoyyyyyyyyo CPU: AMD Ryzen 9 5950X (32) @ 3.400GHz
oyyysyyoyyyysdMMMMMMMMMMMyyyyyyyyo GPU: NVIDIA GeForce RTX 3090
-syyyyyyyyydMMMysyyydMMMysyyyys- Memory: 4283MiB / 32008MiB
-oyyyyyyydMMyyyyyyysosyyyyo-
./oyyyyyyyyyyyyyyyyyyo/.
`.:/oosyyyysso/:.` |
I followed as @NeilPandya, works in my system too.
|
hey @Zren, its been a month since last reference of this PR and Im wondering when will you merge this PR or whether you need more test from others on which side? EDIT: I manage to use this branch and It's working, took me a bit of a brawl since I use @kanocz version first and i need to do clean install thx to @NeilPandya ./o. dhupee@Akago
./sssso- ¨¨¨¨¨¨¨¨¨¨¨¨
`:osssssss+- ╭──────────── Software ────────────
`:+sssssssssso/. │ OS› EndeavourOS
`-/ossssssssssssso/. │ Kernel› 6.4.12-arch1-1
`-/+sssssssssssssssso+:` │ Packages› 1367 (pacman), 12 (flatpak)
`-:/+sssssssssssssssssso+/. │ Shell› zsh 5.9
`.://osssssssssssssssssssso++- │ DE› Plasma 5.27.7
.://+ssssssssssssssssssssssso++: │ Terminal› konsole
.:///ossssssssssssssssssssssssso++: │ Local IP› 172.16.0.2
`:////ssssssssssssssssssssssssssso+++. ├──────────── Hardware ────────────
`-////+ssssssssssssssssssssssssssso++++- │ Host› Nitro AN515-43 V1.12
`..-+oosssssssssssssssssssssssso+++++/` │ CPU› AMD Ryzen 5 3550H with Radeon Vega Mobile Gfx (8) @ 2.100GHz
./++++++++++++++++++++++++++++++/:. │ GPU› AMD ATI Radeon Vega Series / Radeon Vega Mobile Series
`:::::::::::::::::::::::::------`` │ GPU› AMD ATI Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X
│ Memory› 8069MiB / 13916MiB
│ Disk (/)› 171G / 901G (20%)
├───────────── Uptime ─────────────
│› 5 days, 18 hours, 50 mins |
Thanks to @gaganpreet, @NeilPandya for his guide.
|
Works on: But I do get a warning: "Providing a metadata.desktop file for KPackage metadata is deprecated." Which is just minor and it installs perfectly and Authorisation works. |
@Zren any update to when this branch can be merged? |
works nicely here too! -` johnny@johnny-g55590
.o+` --------------------
`ooo/ OS: Garuda Linux x86_64
`+oooo: Host: G5 5590
`+oooooo: Kernel: 6.6.4-zen1-1-zen
-+oooooo+: Uptime: 1 hour, 10 mins
`/:-:++oooo+: Battery: 100% [Full]
`/++++/+++++++:
`/++++++++++++++: Packages: 1907 (pacman)
`/+++ooooooooooooo/` Shell: zsh
./ooosssso++osssssso+` Resolution: 2560x2160
.oossssso-````/ossssss+` Terminal: kitty
-osssssso. :ssssssso.
:osssssss/ osssso+++. CPU: Intel i7-9750H (12) @ 4.5GHz
/ossssssss/ +ssssooo/- Memory: 6119MiB / 15803MiB (38%)
`/ossssso+/:- -:/+osssso+-
`+sso+:-` `.-/+oso:
`++:. `-/+/
.` `/
|
I'm following these steps:
However, when I get to Any ideas on what I'm doing wrong? I'm very layperson with this entire scene btw. |
not without knowing/seeing exactly what you tried. Command by command. |
Wish this PR soon gets merged to master. So that people don't have to keep working with workarounds like cloning feature branch and installing manually. |
Can you type Neil |
@BackOnMyBS Also, maybe you can try again and copy/paste your terminal output to another post here or on pastebin or something like that so others can take a look? |
Try |
@Zren Any updates on when this PR can be merged? Thanks again. |
It works here too!!! _,met$$$$$gg. dan@urios
,g$$$$$$$$$$$$$$$P. OS: Debian 12 bookworm
,g$$P"" """Y$$.". Kernel: x86_64 Linux 6.1.0-21-amd64
,$$P' `$$$. Uptime: 10h 50m
',$$P ,ggs. `$$b: Packages: 3249
`d$$' ,$P"' . $$$ Shell: bash 5.2.15
$$P d$' , $$P Resolution: 5760x1080
$$: $$. - ,d$$' DE: KDE 5.103.0 / Plasma 5.27.5
$$\; Y$b._ _,d$P' WM: KWin
Y$$. `.`"Y$$$$P"' GTK Theme: Sweet-v40 [GTK2/3]
`$$b "-.__ Icon Theme: candy-icons
`Y$$ Disk: 2.9T / 5.7T (51%)
`Y$$. CPU: Intel Core i5-9600K @ 6x 4.6GHz [50.0°C]
`$$b. GPU: AMD Radeon RX 470 Graphics (polaris10, LLVM 15.0.6, DRM 3.49, 6.1.0-21-amd64)
`Y$$b. RAM: 8752MiB / 15856MiB
`"Y$b._
`""""
|
This fixes Google authorization by relying on an external Python script to handle redirects. I tested a couple of scenarios and it works fine on my end. I stuck to the standard library so it should work on every system out of the box.
Fixes #333