Comments (7)
Oh i gotcha, maybe you can save the username as a cookie in the User-Agent somehow? so when a user comes back the next day they don't need to enter their name again, the backend will know "oh there's a cookie already for this username in the User-Agent I can default the username field to the cookie value"
from bgg-companion.
This sounds like a perfect use case for OAuth (Open Authorization) wherein a user authorizes your application to access their data from BoardGeek. If you've ever logged into a site through Google or Facebook, or allowed an application to access your data on another platform (think allowing DigitalOcean to access your Github account to deploy the BGG-Companion
project) it's the same idea. A user in your application would be redirected to BoardGameGeek and BGG would ask them "Hey do you allow BGG-Companion to view your saved games/username/other information?" and if the user accepts your application can request data on behalf of that user from BoardGameGeek.
Unfortunately, based on some quick googling it looks like people have1 requested2 that BoardGameGeek support OAuth for this use case, but it doesn't seem to have gained any traction.
Footnotes
from bgg-companion.
I think that seems reasonable as a first step to get something going. This might need to be another issue, but I was envisioning something along the lines of storing this in a db. This would then be foundation for maybe adding other friends names and save them to your "user". I think it would be cool to be able to pick a random game from any user you save to your profile.
from bgg-companion.
I was thinking we can maybe do authentication on our end let the user save their username so that when they load the application.it automatically pulls data. Right now, it seems we submit a user name and then pull data from that.
from bgg-companion.
I'll leave it up to @JDGiardino and you for the implementation details :) but yes database (or some other file-based) persistence would be the most ideal! Especially if you want to add in some social-based functionality to the site you all would most probably need to store that data in longer-term storage.
from bgg-companion.
Hmmm yeah this will be something to put some research into. I wonder than options exists within DigitalOcean for hosting a database like that.
from bgg-companion.
Here's some useful documentation around cookies https://flask.palletsprojects.com/en/2.1.x/quickstart/#cookies
from bgg-companion.
Related Issues (20)
- Cleanup random_game and re-organize responsibilities
- Setup sponsorship button on github
- improve local BE development experience HOT 3
- [Bug] Cache implementation on BE isn't working as expected HOT 5
- Create a Github Action for a JS Linter
- Create a Github Action for a TypeScript CI
- Auto-complete user field with the last user a client provided HOT 2
- [Bug] Front end commit broke production
- Figure out how to install node JS in digital Ocean
- Make a /favicon.ico
- Don't return actual exception message for all unhandled exceptions
- User can randomize a game based on a filter
- Write tests for Order Games module
- Include filtering for co-op /non co-op games
- Random Team Generator
- Include filtering for Game Complexity
- Create pre-commit hook for requirements.txt
- Include filtering for ordered board games for coop only
- Error handling for filtering that results in empty games list
- Board game collection may contain "previously owned" games
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bgg-companion.