Giter VIP home page Giter VIP logo

Comments (7)

nickdibari avatar nickdibari commented on August 26, 2024 2

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.

nickdibari avatar nickdibari commented on August 26, 2024 1

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

  1. https://boardgamegeek.com/thread/1521917/bgg-api-and-oauth2

  2. https://boardgamegeek.com/thread/2855128/provide-log-bgg-oauth-feature

from bgg-companion.

halo123u avatar halo123u commented on August 26, 2024 1

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.

halo123u avatar halo123u commented on August 26, 2024

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.

nickdibari avatar nickdibari commented on August 26, 2024

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.

JDGiardino avatar JDGiardino commented on August 26, 2024

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.

JDGiardino avatar JDGiardino commented on August 26, 2024

Here's some useful documentation around cookies https://flask.palletsprojects.com/en/2.1.x/quickstart/#cookies

from bgg-companion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.