Problem setting this up with Electron
See original GitHub issueI’m trying to add rich presence to an electron app.
I’ve tried the default code:
After accepting discord auth, it redirects to my redirect Url, but not access token, I got this instead : http://localhost:4242/oauth/redirect#error=invalid_scope
So I tried removing scopes. I just kept rpc.api
scope.
This time, I get the token.
But when I try to
client.login(config.clientId, {
accessToken: token,
scopes : config.scopes
});
all I get is
Could you help on that ? Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Requiring electron outside of main.js causes a TypeError #7300
One reason some people are still experiencing this problem is that nodeIntegration has been removed from Electron v12. So setting ...
Read more >node.js - Electron app.on('ready'... never being called and ...
I found that the error was caused by data being left over in the %AppData%/electron directory, and the %AppData%/[projectname] directory.
Read more >Don't Use Electron Until You've Read This Article - Medium
The Electron team has worked to address this problem, changing setting defaults to more secure options in recent releases.
Read more >Things I Wish I Knew Before Working with Electron.js
In this article, I'll share how you can avoid some of the mistakes I made when learning about Electron.js ?♂️. I hope it...
Read more >Advanced Installation Instructions | Electron
To install prebuilt Electron binaries, use npm. The preferred method is to install Electron as a development dependency in your app:
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
it has to go in main because its a separate process from renderer. Discord will think that your process has no window and therefore won’t think its a game if its in the renderer
I got it working now. It’s working with nodejs and electron
For anyone in the same case as me, you must put the code inside the main.js file and not the renderer.js file. I still don’t know why, I will try to find more infos. You can still communicate between the main and the renderer process using IPC or any other methods