Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Can't Signout -- OAuth as only Auth #31192

@DaedalusG

Description

@DaedalusG
  • Sourcegraph version:
  • Platform information:

Steps to reproduce:

  1. Create a Sourcegraph instance and configure OAuth as the only source of login
	"auth.providers": [
		// {
		// 	"type": "builtin",
		// 	"allowSignup": false
		// },
		{
			"type": "github",
			"displayName": "GitHub",
			"clientID": "REDACTED",
			"clientSecret": "REDACTED",
			"allowSignup": false, // Set to true to enable anyone with a GitHub account to sign up without invitation
			"allowOrgs": [ "sourcegraph" ] // Restrict logins to members of these orgs.
		},
          ]
  1. Sign out and attempt to sign back in

Expected behavior:

You should be able to signout

Actual behavior:

You'll very briefly be signed out -- but you'll immediately be signed back in

This is because Sourcegraph will automatically attempt to use the only available sign in method id only one sign on option is available. If OAuth is the only available option a OAuth signing will immediately be attempted.

Just noting this is documented in our codebase comments, so its not a bug per say

Metadata

Metadata

Assignees

Labels

authbugAn error, flaw or fault that produces an incorrect or unexpected result, or behavior.

Type

No type
No fields configured for issues without a type.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions