Coder Social home page Coder Social logo

ebrahimmfadae / openid-connect-app Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 17.0 1011 KB

Sample project for implementing OIDC server with a web application and an API service.

License: MIT License

TypeScript 70.35% EJS 24.93% CSS 4.72%
oauth2 openid-connect ejs koa mongodb password-grant resource-server authorization-server resource service api

openid-connect-app's Introduction

OpenID Connect App

Released under the MIT license. PRs welcome! Last commit

Sample project for implementing OIDC server with a web application and an API service.

Article reference

This repository is associated with an article series that provides a step-by-step guide on implementing OIDC (OpenID Connect 1.0) with Node.js, TypeScript, and MongoDB:

Project requirements

The project has been developed and tested in the following environment:

$ node -v
v18.17.1

$ yarn -v
v3.6.3

$ docker --version
Docker version 20.10.7, build f0df350

$ docker compose version
Docker Compose version v2.15.1

Getting started

Install dependencies Open a terminal and run the following command to install the project dependencies:

$ yarn install

Run containers Start the project containers by running the command:

$ yarn compose:up

You can see the front end by navigating to http://localhost:3005 with your browser.

Stop containers When you're done using the application, stop the containers by running the command:

$ yarn compose:down

How to contribute

If you have any suggestions or want to propose code changes, you can open an issue or create a pull request with your proposed changes. Feel free to make any further adjustments or additions to the README to suit your project's specific requirements and conventions.

openid-connect-app's People

Contributors

ebrahimmfadae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

openid-connect-app's Issues

Error 500 at the last stage (Issue Tokens)

Hi! Thank you for always answering questions quickly.
I am currently trying to deploy an application on a remote server. And I'm having trouble with that.

The problem arises at the last stage - getting tokens when I try to send a CallBack form. And after it there is an error 500.
I think that the problem appears due to the fact that the OIDC on the server uses HTTPS. The APP uses HTTP.

2023-10-30_23-17-59
2023-10-30_23-15-25
2023-10-30_23-13-20

Please tell me, maybe there are some ideas how to make this application work correctly on a remote server.

Here are the changed environment variables:
Public REMOTE addresses
PUBLIC_OIDC_ISSUER=testsso.site.com:443
PUBLIC_APP_URL=testsso.site.com:3005
PUBLIC_API_URL=testsso.site.com:3006

And also, an error occurs when registering a user: Internal Server Error

Another such warning appears in the logs:
oidc-provider WARNING: x-forwarded-proto header not detected for an https issuer, you must configure your ssl offloading proxy and the provider, see documentation for more details: https://github.com/panva/node-oidc-provider/tree/v7.14.3/docs/README.md#trusting-tls-offloading-proxies

P.S. I configured the NGINX server and now the transition from HTTP < - > HTTPS is working correctly. But the 500 error still appears when issuing tokens (send form on /token). And the 500 error appears when re-authorizing, when we should go to the page with CallBack

On the 'localhost', the application works without errors.

What is the username and password

First of all, thank you for your tutorial, which currently I try to understanding to how to use panva/oidc-provider trough running your code in my machine, however, i cant authenticated, since i dont know the username and the password, can you give me more explanation about this, what thing i should do to use your code?

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.