![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
solid-auth-client
Advanced tools
Opaquely authenticates solid clients
Solid currently supports two cross-origin authentication protocols, WebID-TLS and WebID-OIDC.
This library abstracts away the implementation details of these specs so that clients don't have to handle different authentication protocols.
This API doc uses flow type annotations for clarity. They're just here to show you the types of arguments expected by exported functions. You don't have to know anything about flow.
type authResponse =
{ session: ?session
, fetch: fetch
}
type session =
{ idp: string
, webId: string
, accessToken?: string
, idToken?: string
}
login
login (idp: string, {
redirectUri?: string,
storage?: Storage
}): Promise<authResponse>
Authenticates the user with their IDP (identity provider) and promises an object
containing the user's session and a fetch
function.
When the user is successfully authenticated, the session will be non-null and
the fetch
function (same API as whatwg
fetch) can be used to request any resource on
the web, passing credentials when necessary.
When the user is not found from the IDP, the session will be null
, and the
fetch
will be a plain old fetch.
Auth flows like OIDC require the user to give consent on their identity
provider. In such cases, this function redirects the user to their auth
provider, which sort of breaks the promise. All you have to do is call
currentSession
when the user gives consent and lands back in your app.
If there's an error during the auth handshake, the Promise will reject.
Options:
redirectUri
(default current window location): a URI to be redirected back to with credentials for auth flows which involve redirectsstorage
: An object implementing the storage interface for persisting credentials. localStorage
is the default in the browser.currentSession
currentSession (storage?: Storage): Promise<authResponse>
Finds the current session, and returns it along with a fetch
function, if
their session is still active, otherwise null
and a regular fetch.
logout
logout (storage?: Storage): Promise<void>
Clears the active user session.
Note: this is an unsupported use case in WebID-TLS. Once your browser provides its client cert to a web server, there's no going back! So for WebID-TLS, the only thing this will do is clear the session from the store.
FAQs
Opaquely authenticates solid clients
The npm package solid-auth-client receives a total of 236 weekly downloads. As such, solid-auth-client popularity was classified as not popular.
We found that solid-auth-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.