Explore posts from servers
AOAnswer Overflow
Created by Manicraft1001 on 9/5/2023 in #questions
Bot does not post consent prompt automatically
Hello 👋 Our bot does not send the consent prompt automatically. /send-consent-promt does work and the notice about messages being indexed has been added to the server rules and the posts channel. What configurations need to be done, to automatically send the prompt?
26 replies
TTCTheo's Typesafe Cult
Created by Manicraft1001 on 6/21/2023 in #questions
Empty JWT payload, persisting role permissions and "jankiness" with next-auth
Hello lads. I'm struggeling to get next-auth up and running. It has been working decently, but I have several issues that I'm unable to resolve, even after days of trying out different solutions, package versions and more. Here's what I'm trying to do: - Authentication with Discord & credentials - Implement a role system - Protect certain tRPC procedures for logged in users or users with specific roles Currently, the following issues are present: - When authenticating with Discord, a ID in the user table is generated. However, the session does not contain an ID. I am unable to use the ID in any of my tRPC procedures and therefore can't associate data in the DB with a user. - The payload section in the JWT is empty. Yes, completely empty. I'm not even sure why and how this is somewhat working, but it's definitely not secure nor usable. I do return valid data in all callbacks and copied them from the official documentation. - When an admin changes the roles of a user, the token will still be valid and the user still has the permissions of that role. That's obviously very bad, since the JWT only expires after 30 days and I wasn't able to work around this. The source code is available here: Instructions for set up are located in the readme. It seems like there are major configuration issues with next-auth. The documentation is a bit vague and I'm not understanding, what I'm doing wrong. I don't want to treat users from OAuth providers any different than compared to the credentials in my tRPC routes. Please let me know if you have any questions, and I'll make sure to answer them asap! Environment: Node.js 18 Windows & Linux Versions of all dependencies in the package.json
45 replies
Created by Manicraft1001 on 9/14/2022 in #💬・get-help
Welcome to discussions! 💬 Please follow the guidelines 🙌
We have migrated our "get-help" channel to Discord discussions. If you're having issues, questions or a bug, feel free to ask your question here. Make sure to follow our post guidelines!
4 replies