Giter Site home page Giter Site logo

gkatechis / jwt-messaging-node-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 80 KB

This is an example JWT server, built for the Zendesk messaging web SDK. It demonstrates the behavior of an authenticated messaging experience for your end-users, while also allowing you to contrast it with an unauthenticated session. It is NOT intended for production use.

JavaScript 59.45% HTML 40.27% CSS 0.28%

jwt-messaging-node-example's Introduction

Zendesk Messaging JWT example

This is an example JWT server, built for the Zendesk messaging web SDK. It demonstrates the behavior of an authenticated messaging experience for your end-users, while also allowing you to contrast it with an unauthenticated session. It is NOT intended for production use.

For more information on how to enable authenticated visitors in your Zendesk instance, take a look at our documentation on the subject.

Table of Contents

About The App

For a quick demo, there is a built-in user database of users with first and last name, email, and password. You can use the below credentials to log in to a test instance of Zendesk and initiate a conversation. Note that no agents will be responding, but you will be able to see the bot interaction.

The .env file contains private data that will not be visible to you. Once you Remix the project (see below), you will see the .env file, but the values will be scrubbed and you will be able to enter your own details.

Technologies

This project uses Node and Express.js for the backend, and vanilla-ish JS and HTML for the frontend. Styling utilizes Tailwind CSS.

There are also two cookies added on login to handle the state changes of the login form. They are removed on logout.

Setup

  • Open a terminal window and add the node packages with npm install
  • Navigate to the .env file and enter the key ID and shared secret for your widget. See here for information on obtaining these values.
  • Navigate to src/index.html and replace the widget key snippet with your own. See here for instructions on obtaining the key snippet.
  • Go back to your terminal and enter npm run start
  • Go to http://localhost:3000/ (or whatever port number you specified in .env)
  • That's it, you're all set to go! You can now log in with one of the credentials listed above and start playing around with the authenticated experience. You can also choose the anonymous chat (which is only available)

Bug reports

If you run into any issues or have suggestions, please submit an issue.

Credits

List of contributors:

  • Greg Katechis | Dev Advocacy @ Zendesk
  • Tipene Hughes | Dev Advocacy @ Zendesk

License

MIT license

jwt-messaging-node-example's People

Contributors

gkatechis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.