Quiz on OAuth 2.0 Integration
Test your understanding of integrating OAuth 2.0 in a Beego application.
1
Consider the following code snippet. Which line correctly sets custom scopes for an OAuth 2.0 flow?
conf := &oauth2.Config{
ClientID: "your-client-id",
ClientSecret: "your-client-secret",
RedirectURL: "http://yourdomain.com/callback",
Endpoint: provider.Endpoint,
// Scopes
}
A)
Scopes: []string{"basic"}
B)
Scopes: []string{"email", "profile"}
C)
CustomScopes: []string{"user:email"}
D)
Permissions: []string{"read:user"}
Question 1 of 60 attempted
Get hands-on with 1200+ tech skills courses.