Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Beginner Question] How does otplib handle OTP storage and generation? Is it stateless? #709

@amberyufangchiu

Description

@amberyufangchiu

Hi everyone 👋

I'm a beginner trying to understand how the otplib library works under the hood.

I know that it can generate and validate OTPs based on TOTP/HOTP standards, but I'm confused about how it handles OTP storage. Specifically:

Does otplib store generated OTPs anywhere?
(In memory, on disk, or something else?)

When validating an OTP, how does it verify it without storing anything?

I’m curious because it seems like the library can check an OTP without actually saving what was generated.

I’d really appreciate a beginner-friendly explanation or any resources that help explain what’s happening behind the scenes 🙏

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions