Coder Social home page Coder Social logo

whossname / azure_ad_openid Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 3.0 67 KB

Azure Active Directory authentication using OpenID

Home Page: https://hexdocs.pm/azure_ad_openid/readme.html

License: MIT License

Elixir 100.00%
openid openid-client azure-active-directory authentication elixir elixir-lang azure-ad

azure_ad_openid's People

Contributors

whossname avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

azure_ad_openid's Issues

`System.system_time(:second)` lags producing invalid claim after OS sleep/hibernate

On MacOS Ventura 13.5.2, running System.system_time(:second) appears to drift if the machine has slept. This means that during development you may find that the nbf claim fails intermittently, requiring you to restart your application.

You should be able to reproduce this by running an application, sleeping the machine, and then trying to log back in to the application. If you want to verify the behavior of System.system_time then you can start an IEx session, then sleep your machine for some period of time. When you return to the session, you can get the system time, and in another session started after you wake up your machine check it as well. It should be close to the amount of time that your machine was asleep for.

For example:

Screenshot 2023-09-22 at 11 13 12 AM

On the left is the session that got slept, on the right is a session started after waking up the machine.

I'd love to dig down to the actual system calls and figure out why this is happening. Maybe it's the Erlang VM caching in some expected way? I'm not actually sure if it's system specific or if this is expected behavior. The Erlang call underlying System.system_time is :erlang.system_time which is documented to give you the Erlang view of the OS time. It's stated that this may not match the OS view of the time.

At any rate, the issue of failing nbf claims would be fixed by swapping System.system_time(:second) with :os.system_time(:second) in lib/verify/claims.ex. That is, unless I've misunderstood the nature of the verification and this is expected behavior.

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.