Skip to content

Support custom authentication #180

@farnabaz

Description

@farnabaz

Studio does now have a plan to implement other authentication providers (expect google/github/gitlab). the plan is to provide utility for websites to define session for studio and do their own authentication.

Studio will provide setStudioUserSession utility which users can use to set session for Studio. Inside your API endpoints you should authenticate users and then set session using this utility.

export default enentHandler(async (event) => {
  // authenticate user and make sue user has all rights to edit website and commit

    await setStudioUserSession(event, {
       providerId: 'users unique id',
       accessToken: 'GITHUB_OR_GITLAB_PERSONAL_ACCESS_TOKEN',
       name: 'user name',
       avatar: 'user avatar',
       email: 'user email',
       provider: 'google',
     })
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions