Skip to content
Discussion options

You must be logged in to vote

When do you want to validate them, when they submit the form? I recommend going through the local auth app. You should be able to authenticate in an event handler.

class FormState(rx.State):

    current_user_info: UserInfo = UserInfo(
        current_user='',
        user_pass = ''
    )
    
    def authenticate(self):
        # Call your api here
        is_valid = my_api(self.current_user, self.user_pass)

You can then call the authenticate event handler whenever you want to run your API call.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@paul-stork
Comment options

Answer selected by paul-stork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants