github clerk/javascript @clerk/vue@1.8.0

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

Minor Changes

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

    useAuth()

    Plan

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

    Feature

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

    Scoped per user or per org

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

    <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" />

Patch Changes

Don't miss a new javascript release

NewReleases is sending notifications on new releases.