Download the PHP package kyzegs/supabase-auth-bundle without Composer

On this page you can find all versions of the php package kyzegs/supabase-auth-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package supabase-auth-bundle

SupabaseAuthBundle

Stateless Symfony authentication via Supabase-issued JWTs.

The bundle verifies a Supabase JWT (signature against the project JWKS, plus exp and iss checks) and hands the verified claims to an application-provided resolver that maps the Supabase identity to your own user. Verification logic lives here once; the only application glue is the resolver.

Installation

If you don't use Symfony Flex, register the bundle manually in config/bundles.php:

Configuration

config/packages/supabase_auth.yaml:

Option Default Description
url (required) Supabase project URL, e.g. https://xxxx.supabase.co. Must be an absolute http(s) URL.
jwks_ttl 600 Seconds to cache the JWKS (matches the Supabase edge cache).
leeway 0 Allowed clock skew (seconds) for the exp, iat and nbf checks.
audience null When set, the token aud claim must contain this value (Supabase uses authenticated).
algorithms [RS256, ES256] Signature algorithms accepted from the JWKS. Must be a subset of RS256, ES256.
test_mode false Swap the handler for one accepting {prefix}{identifier} tokens.
test_token_prefix test-user- Bearer-token prefix recognised in test mode.

Invalid configuration (an unsupported algorithm, a negative jwks_ttl/leeway) fails fast at container compile time. The url is validated at runtime instead, so an %env(SUPABASE_URL)% value — which is unresolved during compilation — is accepted; a non-http(s) URL is rejected on first token verification.

Wiring the firewall

Point your firewall's access-token handler at the public service id supabase_auth.token_handler:

Provide a user resolver

Implement SupabaseUserResolverInterface to map verified claims (typically the sub claim) to your security user, and alias the interface to it:

Returning null from resolve() produces an authentication failure.

Testing your application

With test_mode: true, send Authorization: Bearer test-user-{identifier} and the bundle calls your resolver with ['sub' => '{identifier}'] — no real JWT required.

License

MIT


All versions of supabase-auth-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
psr/clock Version ^1.0
web-token/jwt-library Version ^4.1.4
symfony/cache-contracts Version ^3.4
symfony/clock Version ^7.2|^8.0
symfony/config Version ^7.2|^8.0
symfony/dependency-injection Version ^7.2|^8.0
symfony/http-client Version ^7.2|^8.0
symfony/http-client-contracts Version ^3.4
symfony/http-kernel Version ^7.2|^8.0
symfony/security-core Version ^7.2|^8.0
symfony/security-http Version ^7.2|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kyzegs/supabase-auth-bundle contains the following files

Loading the files please wait ...