dioxus/examples/openid_connect_demo
Stygmates b836851d02
Add openidconnect authentication demo (#1500)
* Add openidconnect authentication demo

* use_atom_ref usage to have a read/write handle on the atom

* Use default

* Code rewrite to better reflect the authentication flow

* Use the env macro instead of the build.rs to load env variables

* Add env variables

* Remove unnecessary dependency

* Add env variables to the root workspace

* Update readme

* Bump openidconnect version

* Use props to pass the client to the child components

* Code clean up

---------

Co-authored-by: Truong Tan Dat <truongt@igbmc.fr>
2023-10-20 12:43:24 -05:00
..
src Add openidconnect authentication demo (#1500) 2023-10-20 12:43:24 -05:00
.gitignore Add openidconnect authentication demo (#1500) 2023-10-20 12:43:24 -05:00
Cargo.toml Add openidconnect authentication demo (#1500) 2023-10-20 12:43:24 -05:00
Dioxus.toml Add openidconnect authentication demo (#1500) 2023-10-20 12:43:24 -05:00
README.md Add openidconnect authentication demo (#1500) 2023-10-20 12:43:24 -05:00

OpenID Connect example to show how to authenticate an user

The environment variables in .cargo/config.toml must be set in order for this example to work(if this example is just being compiled from the root workspace, the .cargo/config.toml from the root workspace must be set as stated in the Cargo book).

Once they are set, you can run dx serve

Environment variables summary

DIOXUS_FRONT_ISSUER_URL The openid-connect's issuer url

DIOXUS_FRONT_CLIENT_ID The openid-connect's client id

DIOXUS_FRONT_URL The url the frontend is supposed to be running on, it could be for example http://localhost:8080