Skip to content

Allow external login page #935

@Thomas-Philippot

Description

@Thomas-Philippot

Describe the feature

It would be great t allow external login page on local provider.

provider: {
  type: 'local',
  pages: {
    login: 'http://my-external-login-page',
  },
},

Currently this triggers an error : Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })

How would you implement this?

Changing the auth.js middleware to check if authConfig.provider.pages.login is an external link

const external = /^https?:\/\/\S+/.test(authConfig.provider.pages.login)
return navigateTo(authConfig.provider.pages.login.path, { external });

Additional information

  • Would you be willing to help implement this feature?

Provider

  • AuthJS
  • Local
  • Refresh
  • New Provider

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn improvement that needs to be added

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions