Flask - Retrieve Steam ID - html

I'm working on a Flask project and would like users to be able to connect one or more Steam accounts to their profile on the website. The user is not logging into my website with their Steam account, they are just registering a Steam account to a pre-existing profile on my site, so I'm not sure if I should be using OpenID or not.
I would like for there to be some way for the user to enter their Steam username, be shown a corresponding account, and register the account to their profile. Or alternatively, there is a button that takes the user to a Steam Login page, which redirects back to my website after logging in and passing back the needed data. I'm not picky how, I just need to somehow get the ID associated with a Steam account.
Everything I've found so far has been for logging into a website using a Steam account. I assume the process would be similar, and maybe easier, to just get back an ID based on user input, but so far I've had no luck.
Thanks for your help

Related

User specific information upon loin

I am looking to make a website whereby a user will be able to login and register. Once registered and logged in I would like for them to see a list of their own customers and carry out some functionally configured to the user (e.g send an SMS from their registered phone number).
I have seen plenty of tutorials on how to implement both login and register functionality. But I have no idea how to make the information shown be specific to each customer?
Can someone assist by pointing me in the right direction for something like this? Or even a template that may already have it done?
So fair I have been able to create a very basic site (localhost) that has a user login and registration form.
Sending SMS from website is done with paid services, you can search some of them.
User specific website is done for example by using PHP. For example you have form for registration and then save the data into a database. Next time the user comes, you offer him login form, if he logs in succesfuly, you now know who the user is and offer some content according to the user. For example (simplified) you will have a folder named "Peter" and in this folder you will have informations about Peters customers. And if Peter logs in, you offer him data from this folder.

Is it good idea to authenticate every page of my website?

I am currently using JSON Web Token to authenticate every page of my website except homepage. The idea is to generate token on login/registration with the user's MongoDB id and save that into cookies. Then whenever user tries to open any page, first token will be decoded and then id will be matched with the database records to verify that the correct user is trying to access page.
I haven't launched the website yet. My question is, is it a good practice to access database before every page loads for user or will it slow down my website once more users start coming on website?

Create Website with Facebook API to collect invited User ID's

I am looking to integrate Facebook into my website. The website is basically an online meeting and the user has to know the host's username to log in. I was wondering if there is a way withing the Facebook API to invite specific users and link them to this meeting object, I was thinking by pulling the invited users User ID and inputting it into a database, so that when the guest goes to the party they just have to log into Facebook and it will bring them to the correct party (by MySQL search matching their user ID with a meeting). I hope I explained this correctly, but is there a way to do this with the API, or even a better way to complete this?

Integrating multiple user account tables

I have three websites: a.example.com, b.example.com, and c.net. Each was built a couple years after the other and all have their own users table.
I want to integrate these sites together so that I can login with a single username/password combo and have access to all three sites just by clicking links without having to login again.
I've never done an integration like this before, so looking at two angles:
1) Create another website, 'd.net' where new accounts can be created. If you login to one of the original three sites, it asks you for your d.net account. If you dont have one it asks you to make one. In your 'account settings' on d.net, you can 'add sites' to your account by entering your old username and password for them. Sound reasonable?
2) Solving the technical problem of being able to one-click login to another of the three sites if i'm already logged into d.net. Afaik, cookies with a session ID can't be shared across domains. So... maybe generate a token and save it to the database. Send token over GET to another website, which can check the token, log the user in, and then delete the token. Sound about right?
Have you looked at OpenID?
http://en.wikipedia.org/wiki/OpenID
Don't have to re-invent the wheel.

Facebook connect database transaction help

I am trying to implement a simple login system with facebook, but I need users to pick a username. What I was thinking was to get all the information I need from facebook, request permissions, then add the information to the database, redirect to a form asking for a username and then add that to the database, to the same entry.
I think a transaction is needed so I don't end up with any half completed database entries. But I've only ever used them on the same page, so I'm wondering if this is safe? If it fails then there is no point where I would be telling the database to roll back the changes and it would be with a transaction open.
Is this right or will it be ok?
I think you made it more complicated than it should be :)
No need to enter facebook id into database before username as you can always grab it later.
Forward user to login screen (or better just open login popup using javascript FB API)
Once user is logged in forward them to username picking page (or better do javascript popup without page redirect)
When user is entered username request the current user id from facebook on server side (by either using graph api or fql) and then if everything is ok enter this record to database.