github clerk/javascript @clerk/astro@2.10.0

latest releases: @clerk/types@4.92.0, @clerk/clerk-js@5.99.0, @clerk/fastify@2.4.37...
4 months ago

Minor Changes

  • Introduce feature or plan based authorization (#6188) by @wobsoriano

    <Protect />

    Plan

    <Protect plan="my-plan" />

    Feature

    <Protect feature="my-feature" />

    Scoped per user or per org

    <Protect feature="org:my-feature" />
    <Protect feature="user:my-feature" />
    <Protect plan="org:my-plan" />
    <Protect plan="user:my-plan" />

    useAuth() in React

    Plan

    const { has } = useAuth();
    has({ plan: 'my-plan' });

    Feature

    const { has } = useAuth();
    has({ feature: 'my-feature' });

    Scoped per user or per org

    const { has } = useAuth();
    
    has({ feature: 'org:my-feature' });
    has({ feature: 'user:my-feature' });
    has({ plan: 'user:my-plan' });
    has({ plan: 'org:my-plan' });

Patch Changes

Don't miss a new javascript release

NewReleases is sending notifications on new releases.