Open HomerusJa opened 6 days ago
Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊
You can also check our CONTRIBUTING.md for guidelines on contributing to this project.
This is different to #17 because it right here, you should be able to input your keys and stuff. I think, this should be done before proceeding with #17.
Agreed @HomerusJa. Have at it!
Should we directly go with a solution which would allow multiple passwords and so on and which stores them in a SQLite database? This would be significantly more work, but we wouldn't just redo this issue again when we start working on #17.
Multiple passwords for a single user. @HomerusJa please elaborate if you will.
@HomerusJa at this stage, I believe we should keep things fairly simple not to create unnecessary complexity. However, since you restructured the application. I'll let you decide what you think is best. Remember, this is suppose to be fun, we're in it for the love of code! Have fun with it! 😃
Hi @dmotts can I help looking forward for your reply
Hey @shaikmynuddin, this task has been assigned to @HomerusJa so I'll let him decide if he'll want a hand. In the meantime, feel free to explore the other issues or open source projects available.
@shaikmynuddin You can happily work on this. I’ll be gone for the next few days, so there you go!
You might want to have a look at this: https://github.com/mkhorasani/Streamlit-Authenticator , but I think this can also easily be implemented by yourself.
@HomerusJa @shaikmynuddin @swarupn17 @shawaiz-khan Guys please note, that we are moving away from streamlit to a more suitable option. I implore you to express your thoughts and ideas here -> #31
Thank you for your co-operation guys! 💪💯🙌
If I didn't mention your name, it just means it didn't show up on my dropdown menu. Just know, when I say 'guys' or 'people' or 'team'. I'm talking to everyone! 😄
Let's go! 💥💯,💥
@HomerusJa @shaikmynuddin @swarupn17 @shawaiz-khan Guys please note, that we are moving away from streamlit to a more suitable option. I implore you to express your thoughts and ideas here -> #31
Yes I am looking into that also first I will complete these as some Example login page
Great @shaikmynuddin! I'm looking forward to seeing it. 😁
Hey @shaikmynuddin. This may require the frontend to be completed however, creating the API would be good to go since the project has a new structure.
Owner
I have worked on authentication I used flask and react for that simple sign up and login first we have change the streamlit content to web then I can integrate it features
code app = Flask(name) CORS(app, supports_credentials=True) app.config.from_object(ApplicationConfig) db.init_app(app) bcrypt = Bcrypt(app) Session(app) with app.app_context(): db.create_all()
@app.route("/@me") def get_current_user(): user_id = session.get("user_id")
if not user_id:
return jsonify({"error": "Unauthorized"}), 401
user = User.query.filter_by(id=user_id).first()
return jsonify({
"id": user.id,
"email": user.email
})
@app.route("/register", methods=["POST"]) def register_user(): data = request.get_json() email = data["email"] password = data["password"]
user_exists = User.query.filter_by(email=email).first()
if user_exists:
return jsonify({"error": "User already exists"}), 409
hashed_password = bcrypt.generate_password_hash(password).decode('utf-8')
new_user = User(email=email, password=hashed_password)
db.session.add(new_user)
db.session.commit()
session["user_id"] = new_user.id
return jsonify({
"id": new_user.id,
"email": new_user.email
})
@app.route("/login", methods=["POST"]) def login_user(): data = request.get_json() email = data["email"] password = data["password"]
user = User.query.filter_by(email=email).first()
if user is None:
return jsonify({"error": "Login details are incorrect"}), 401
if not bcrypt.check_password_hash(user.password, password):
return jsonify({"error": "Unauthorized"}), 401
session["user_id"] = user.id
return jsonify({
"id": user.id,
"email": user.email
})
@app.route("/logout", methods=["POST"]) def logout_user(): session.pop("user_id", None) return jsonify({"message": "Successfully logged out"})
I want Mainly tech stacks of Application So it would be easy to integrate and I didn't received any request yet in the discord can paste link of your channel
We are going for a FastAPI and SQLAlchemy tech stack in the backend. If you have any questions regarding the targeted architecture/the libraries used, feel free to ask. Can you prepend the routes with /auth?
We are going for a FastAPI and SQLAlchemy tech stack in the backend. If you have any questions regarding the targeted architecture/the libraries used, feel free to ask. Can you prepend the routes with /auth?
frontend you can just change the paths and libraries I will just provide you structure first with duplicate branch
Is there an existing issue for this?
Feature Description
To make the app more usable, we should add the feature to log in directly on the server without modifying a file on the serverside.
Use Case
It would enhance the usability.
Benefits
No response
Add Screenshots
No response
Priority
Medium
Record