print verify linbk
This commit is contained in:
@@ -305,12 +305,14 @@ def send_register_mail(signup_email):
|
||||
)
|
||||
link_url= str(panel_url) + '/csignup/' + jwt_part
|
||||
print(link_url)
|
||||
firstname ='Name001'
|
||||
msg = Message(
|
||||
'verify your MERMS Account',
|
||||
sender ='message@chiefsoft.com',
|
||||
recipients = [signup_email,'ameye+merscopy@chiefsoft.com']
|
||||
)
|
||||
msg.body = f"""Hello Firstname,
|
||||
msg.body = f"""
|
||||
Hello {firstname},
|
||||
You received this message for account verification
|
||||
|
||||
Follow the link:{link_url}
|
||||
@@ -327,15 +329,10 @@ def send_register_mail(signup_email):
|
||||
@app.route("/panel/auth/register/verify", methods=["POST"])
|
||||
def verify_register():
|
||||
data = request.json
|
||||
print(data)
|
||||
# print('AAA')
|
||||
# print(data.verify_link)
|
||||
# print('BBB')
|
||||
# print(data['verify_link'])
|
||||
# vrL ='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoiOTgyODkyODQyODI4NTI4OSIsInVpZCI6Ijk4Mjg5Mjg0MjgyODUyODkifSwiZXhwIjoxNzM1NTA0MDE4fQ.pDQvYUr_PGZMeMO2gr-B3DRQ7AM7IjVM5vSERNTviG4'
|
||||
# print(data)
|
||||
vrl = data['verify_link']
|
||||
print( vrl )
|
||||
try:
|
||||
# data= jwt.decode(data.verify_link, app.config['SECRET_KEY'], algorithms=["HS256"])
|
||||
data= jwt.decode(vrL, app.config['SECRET_KEY'], algorithms=["HS256"])
|
||||
except:
|
||||
return jsonify({'status': 'INVALID', 'message': 'Link is invalid'}),403
|
||||
|
||||
Reference in New Issue
Block a user