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