Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need the current_user #31

Closed
furjac opened this issue Mar 2, 2024 · 7 comments
Closed

Need the current_user #31

furjac opened this issue Mar 2, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@furjac
Copy link

furjac commented Mar 2, 2024

Is your proposal related to a problem?

I'm unable to use user = auth.current_user like we can get many things out of it you only use signin with email and password as user but I can't use it everywhere u understand I think add this feature plz

Describe the solution you'd like.

User = Auth.current_user
This is what needed

Describe alternatives you've considered.

No response

Additional context.

No response

@furjac furjac added the enhancement New feature or request label Mar 2, 2024
Copy link

github-actions bot commented Mar 2, 2024

Hello @furjac , thank you for submitting an issue! A project committer will shortly review the issue.

@Lxstr
Copy link

Lxstr commented Mar 2, 2024

You need to use a session management tool such as flask-session. This is out of scope for this repo.

@furjac
Copy link
Author

furjac commented Mar 2, 2024

@Lxstr see i build cli tools yep cli i used pyrebase it was fine working but the problem is email verification link was not coming correctly thats why i came here
but here auth.current_user not working but as u said it needs flask no it doesnt pyrebase worked fine without flask or anything

@AsifArmanRahman
Copy link
Owner

current_user property was dropped because of security vulnerability, and it will not be supported. If current_user property is used, it'll provide access of one logged in user to every other user, because the creds/token is stored as an object attribute value, which is not specific to each user separately.

@furjac
Copy link
Author

furjac commented Mar 2, 2024

yea i see and i found a solution correct me if im wrong
@AsifArmanRahman

def signUp():
    clear()
    print('Signup menu')
    email = input("Enter your email address: ")
    password = input("Enter Your password: ")
    try:
        user_info = auth.create_user_with_email_and_password(email, password)
        print("Successfully signed up")
        user_id_token = user_info['idToken']

        auth.send_email_verification(user_id_token)

        logIn()
    except Exception as e:
        print(f"Error during signup: {e}")
    is this ok

@AsifArmanRahman
Copy link
Owner

Yeah it seems fine. I thought you needed that generic auth.current_user to be used everywhere else, thus @Lxstr mentioned session management tools. But if your need only applies to per case, it'll work fine.

@furjac
Copy link
Author

furjac commented Mar 2, 2024

i still have this doubt

def main_menu():
    clear()
    print('Welcome to FG SMM Panel || by Furjack')
    print(f'Signed in as{user_info_['email']}')
    print('\n1. otpion)
    print('2. option)
    print('3. option)
    print('4. option )
    print('5. Exit')

here how do i get the email this function is seperate i tried global it doesnt work

@furjac furjac closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants