The laws aren't about whether the user is considered an adult or not, but how old they are. That means the website needs to be able to know if the user is XXyrs old or not.
If the OS stores the user account birthday, whatever API is used should ask if the user is XX yrs old or not and the OS gives a TRUE or FALSE response. No other data should be available, and the website should only be able to ask this once per cookie/session where an account is not saved.
What becomes more complicated is a shared device such as a smart TV - does the TV need everyone's account or does it default to child-friendly mode for general operations, and you need to login to a service that has your birthday so as to allow for adult access?