Skip to content

Ability to increase scopes without copy pasting a lot of code #37

@mustafaakin

Description

@mustafaakin

Since the current scopes are limited to name, id and avatar, adding an email scope requires copying & pasting a lot of code for each provider, but of course I can be wrong.

auth.go:

p := provider.Params{
	URL:         s.opts.URL,
	JwtService:  s.jwtService,
	Issuer:      s.issuer,
	AvatarSaver: s.avatarProxy,
	Cid:         cid,
	Csecret:     csecret,
	L:           s.logger,
}

    ...
case "google":
	s.providers = append(s.providers, provider.NewService(provider.NewGoogle(p)))

Using this feels a lot verbose, is this a good idea to allow scopes as a parameter?

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionSomething to talk about

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions