Google reCaptcha is a popular service providing anti-abuse security to protect your application. For integrating Google reCaptcha in an application, the app or web domain has to be registered to get the API keys.
There are two keys named as Site key and the Secret key will be given by registering the application. The site key and the secret key can also be known as public and private keys respectively.
In this tutorial, we are going to see how to get the Google reCaptcha API keys by following the three simple steps listed below.
In this tutorial, We will show you how to setup Apple Login in Wilcity.
Note that it will take effect to the both Wilcity Web Version and Wilcity App version.
At the end of this process, you’ll end up with a registered client_id (which they call a Service ID), a private key downloaded as a file, and you’ll verify a domain and set up a redirect URL for the app.
Step 1: Apple App ID
Firstly, sign in to the Apple Developer Portal and click on Certificates, Identifiers and Profiles:
Next, Navigate to Identifiers. On the Identifiers page, you can see a list of registered App IDs. If you don’t have any App ID, you will have to create a new one.
If you already have the App IDs. please click this link
Create the App IDs
Step 1: Select App IDs
Step 2: On the next screen, please write something about your app to description field and set Explicit to Bundle ID. The Bundle ID is best when it’s a reverse-dns style string.
For example: you should use com.yoursite if your site address is yoursite.com.
You’ll also want to scroll down through the list of capabilities and check the box next to Sign In with Apple.
Go ahead and confirm this step.
Edit Existing App IDs
Click on your App IDs Name:
You will see the list of the App ID Configuration here, scroll down to find Sign In With Apple, check the tick box at (1), then click edit at (2) :
After clicking on (2), make sure you choose Enable as a primarily App ID. Finally, click Save button to save the changes.
Step 2: Create a Services ID (Client_ID)
This is required to make single login experience.
The Services ID will identify the particular instance of your app, and is used as the OAuthclient_id.
Go ahead and create a new identifier and choose Services IDs.
In the next step, you’ll define the name of the app that the user will see during the login flow, as well as define the identifier which becomes the OAuthclient_id.Make sure to also check the Sign In with Apple checkbox.
You’ll also need to click the Configure button next to Sign In with Apple in this step. This is where you’ll define the domain your app is running on, as well as define the redirect URLs used during the OAuth flow.
Make sure your associated App ID is chosen as the Primary App ID. (If this is the first App ID you’ve made that uses Sign In with Apple, then it will probably already be selected.)
Enter the domain name your app will eventually be running at, and enter the redirect URL for your app as well.
Your redirect URL MUST have this format URL like this:
which will catch the redirect so you can see the authorization code returned.
It’s worth noting that Apple doesn’t allow localhost URLs in this step, and if you enter an IP address like 127.0.0.1 it will fail later in the flow. You have to use a real domain here.
Go ahead and click Save and then Continue and Register until this step is all confirmed.
At this point, you now have an App ID container to hold everything, and you’ve created a Services ID which you’ll use as your OAuth client_id. The Identifier you entered for your Services ID is your OAuth client_id.
Step 3: Create a Private Key for Client Authentication
Rather than using simple strings as OAuth client secrets, Apple has decided to use a public/private key pair, where the client secret is actually a signed JWT. This next step involves registering a new private key with Apple.
Back in the main Certificates, Identifiers & Profiles screen, choose Keys from the side navigation.
Click the blue plus icon to register a new key. Give your key a name, and check the Sign In with Apple checkbox.
Click the Configure button and select your primary App ID you created earlier.
Apple will generate a new private key for you and let you download it only once. Make sure you SAVE this file, because you won’t be able to get it back again later! The file you download will end in .p8, but it’s just text inside, so rename it to key.txt so that it’s easier to use in the next steps
Lastly, go back and view the key information to find your Key ID which you’ll need in the next step.
Generate the Client Secret
Rather than static client secrets, Apple requires that you derive a client secret yourself from your private key. They use the JWT standard for this, using an elliptic curve algorithm with a P-256 curve and SHA256 hash. In other words, they use the ES256 JWT algorithm. Some JWT libraries don’t support elliptic curve methods, so make sure yours does before you start trying this out.
The Ruby JWT library supports this algorithm, so we’ll use that to generate the secret.
First, make sure you’ve got Ruby installed, and then install the JWT gem by running this from the command line:
gem install jwt
Now thejwt gem should be available for use. Fill in the missing values at the top of this file, and save it as client_secret.rb. You should already have the client_id value from the previous step. You’ll also need your Apple Team ID. This is displayed in a few places, but the most convenient is in the top right corner of the screen. Use the Key ID you found in the previous step.
This code generates a JWT using the ES256 algorithm which includes a handful of claims. This JWT expires in 6 months, which is the maximum lifetime Apple will allow. If you’re generating a new client secret JWT every time a user authenticates, then you should use a much shorter expiration date, but this allows us to generate the secret once and use it in our sample apps easily.
Now you can run this from the command line and it will output a JWT.
result ( this is just an example, please don’t using this output JWT ):
In HsBlog, You can set up a Post Format for each article:
From the admin sidebar, click on Posts -> Add New (or Edit post)
On Right Side – Document tab: Click on Status & Visibility and select Post Format (Gallery, Video, Audio, Standard).
Video/Audio: if Post format is Video or Audio, please scroll down to Hsblog Video/ Hsblog Audio and paste the link of media into the field.
Galley: If Post format is Gallery, please scroll down to Hsblog Gallery and select images in the gallery field.
** Audio and video link: HsBlog is supporting YouTube, Facebook, SoundCloud, Streamable, Vidme, Vimeo, Wistia, Twitch, DailyMotion, Vidyard, and all Supported file types<video>element or <audio>element