Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.23 KB

README.md

File metadata and controls

36 lines (23 loc) · 1.23 KB

A very simple and naive example of signing in using Ravencoin NFTs

It uses the simple REDIRECT flow (no server side polling)

Clone the GIT repository git clone https://github.com/ravenrebels/demo-site-sign-in-simple.git

Change working directory cd demo-site-sign-in-simple

Install dependencies npm install

Run the server locally node index and visit http://localhost

So what is going on?

  • When the user click Sign in, the web site requests an authentication order from idp.ravenrebels.com.
  • The web sites adds an redirectURL attribute to the request
  • After the user is signed in, she is redirect back to the simple site.
  • The web site get the query parameter orderRef and use that to fech user information from idp.ravenrebels.com and stores that in the user session.

Stuff to be aware of

The authentication orders on idp.ravenrebels.com are short lived. They expire in minutes. So when the user is redirected back to your site, fetch the information and save it.

Thats it, thats the demo.

You can try this out live on https://simple-ravencoin-signin.herokuapp.com

For more information about idp.ravenrebels.comcheck out the extended demo https://github.com/ravenrebels/demo-site-with-ravencoin-authentication