Coder Social home page Coder Social logo

hcaptcha's Introduction

Welcome to my GitHub Profile! ๐Ÿš€

I am a hobby developer from India who is passionate about all things tech. In my free time, I like to work out, read about money, success, and life, and of course, code! I am proficient in a variety of programming languages, including Python, JavaScript, C++, TypeScript, HTML, CSS, and SASS. I have experience working with a variety of tools, such as Git, Hugo, Linux, Nuxt.js, Vue.js, PostgreSQL, TailwindCSS, and Firebase.

On my profile, you will find a variety of projects that I have created, ranging from personal projects to open-source contributions. I am always looking to learn new skills and technologies, so my portfolio is always evolving.

Feel free to take a look around and explore my projects. You never know, you might find something that piques your interest. And, if you have any questions or feedback, please don't hesitate to reach out to me. I'm always happy to chat.

Thank you for visiting my profile! ๐Ÿ™

hcaptcha's People

Contributors

vaibhavsys avatar

Stargazers

 avatar  avatar

Watchers

 avatar

hcaptcha's Issues

When I use with flask, I got a error

My code:

from hcaptcha.hcaptcha import HCaptchaVerifier, HCaptchaVerificationError
hcaptcha_client = HCaptchaVerifier(secret_key="")

@public_blueprint.route('/signup', methods=['GET', 'POST'])
def signup():
	if request.method=="POST":

		hcatpcha_token=request.form.get('hcatpcha_token')
		nickname=request.form.get('nickname')

		nombre=request.form.get('name1')
		apellido=request.form.get('name2')

		email=request.form.get('email')
		password=request.form.get('password')

		try:
			is_valid = asyncio.run(hcaptcha_client.verify(hcatpcha_token))
			if is_valid:
				cuenta=Accounts(username="", password=password, gmail=email, number="", nombre=" ", apellido="", genero="", fecha_nacimiento="", fecha_registro=datetime.now(), VIP="")
				db.session.add(cuenta)
				db.session.commit()
			else:
				print("Captcha INvalido")
				return render_template('public/signup.html', msg="No haz completado el captcha!")
		except Exception as e:
			return e

	return render_template('public/signup.html', msg="Hello World")

I post to /signup

TypeError
TypeError: The view function did not return a valid response. The return type must be a string, dict, list, tuple with headers or status, Response instance, or WSGI callable, but it was a HCaptchaVerificationError.
Traceback (most recent call last)
    File "/home/krootca/nulltech/lib/python3.11/site-packages/flask/app.py", line 1466, in wsgi_app
    response = self.handle_exception(e)
               ^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/krootca/nulltech/lib/python3.11/site-packages/flask/app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/krootca/nulltech/lib/python3.11/site-packages/flask/app.py", line 873, in full_dispatch_request
    return self.finalize_request(rv)
           ^^^^^^^^^^^^^^^^^^^^^^^^^

    File "/home/krootca/nulltech/lib/python3.11/site-packages/flask/app.py", line 892, in finalize_request

    response = self.make_response(rv)
               ^^^^^^^^^^^^^^^^^^^^^^ [Open an interactive python shell in this frame] 

    File "/home/krootca/nulltech/lib/python3.11/site-packages/flask/app.py", line 1201, in make_response

    raise TypeError(
    ^

    TypeError: The view function did not return a valid response. The return type must be a string, dict, list, tuple with headers or status, Response instance, or WSGI callable, but it was a HCaptchaVerificationError.

If I can fix this I will editing this text

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.