Posts

Using JWT as Authentication for Chatbot (Dialogflow/Alexa)

Image
0 I need to use Authentication in Dialogflow or Alexa or Oracle Bot. I have a link from the 3rd party where it will redirect to the login page if the user is not logged in to that site and provides the jwt token in the JSON format: www.thirdparty.com/gettoken { "username" : "ABC", "jwt" : asddasdadasdasdasd, "expires" : 1000000 //ms } How to use this as Authentication? Like it will open popup and ask for Login to 3rd party and once login successful it will send the jwt token back to the bot so that that token can be used for all web service call to the 3rd party system. I can use this token but getting that token is where I need help. Note: I am new to this scenario, googled many blogs but didnt find accurate response. ...

How to paginate a list of posts belonging to a specific category in GatsbyJS

Image
0 I have developed a blog with Gatsby JS and I managed to add categories to each markdown file so that I can create pages by querying a specific category and list all the posts related to that category. Now, I'm trying to add pagination to avoid an infinite list of posts inside each category page. I have been following the official guide here: https://www.gatsbyjs.org/docs/adding-pagination/ And this is the code I came up with: gatsby-node.js const path = require('path') const _ = require("lodash") const { createFilePath } = require("gatsby-source-filesystem") exports.createPages = ({actions, graphql}) => { const {createPage} = actions const articleTemplate = path.resolve(`src/templates/article.js`) const categoryTemplate = path.resolve("src/templates/categor...