Thursday, July 25, 2024
HomeUncategorizedHow to create website authentication like google webmaster in your Saas business?

How to create website authentication like google webmaster in your Saas business?

Verify content from backend like google webmaster?

Step 1: Generate a Random key

Generate a Random key and allocate, save to the domain profile and create a meta name for that.

ie: <meta name=”google-site-verification” content=”2yRQZXLGJLLNN28E”>

Step 2: Place of Website

Ask the webmaster to paste the code in the header tag of their website.

Step 3: Ask to Verify

Then ask the user to click verify once code is placed.

Now in your backend, fetch the URL  and find the element

Step 4: Parse in Backend & Verify

Parse the content using this JS or any virtual DOM

In case you are using DOM, use these vanial javascript code to parse the content.var foundTag = document.querySelectorAll(‘[name=”google-site-verification”]’) authCode=foundTag[0].content

will return the verification code
ie: “2yRQZXLGJLLNN28E”

Once you have the value you can do verification on the server and you are done.

Now you can compare with the secret you have allocated.

Rana
Ranahttps://ranajayant.com/
Rana Jayant is a Tech Enthusiast, avid reader, and loves to talk business. TECH10MENT was his 1st professional tech magazine started in 2015. His professional blogging experience serves thousands of visitors every day on the food, travel, and other tech sites.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments