Skip to content

Commit 90e0efc

Browse files
committed
Added usage comments
1 parent 3b45d11 commit 90e0efc

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

providers/cognito/cognito.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ import (
1313
)
1414

1515
// Provider is the implementation of `goth.Provider` for accessing AWS Cognito.
16+
// New takes 3 parameters all from the Cognito console:
17+
// - The client ID
18+
// - The client secret
19+
// - The base URL for your servcice, either a custom domain or cognito pool based URL
20+
// You need to ensure that the source login URL is whitelisted as a login page in the client configuration in the cognito console.
21+
// GOTH does not provide a full token logout, to do that you need to do it in your code. If you donot perform a fuil logout thee
22+
// existing token will be used on a login and the the user won't be prompted until after expiry.
23+
// To perform a logout
24+
// - Destroy your session (or however else you handle the logout internally)
25+
// - redirect to https://CUSTOM_DOMAIN.auth.us-east-1.amazoncognito.com/logout?client_id=clinet_id&logout_uri=http://localhost:8080/
26+
// (or whatever your login/start page is).
27+
// - Note that this page needs to be whitelabeled as a logout page in the cognito console as well.
28+
1629
// This is based upon the implementation for okta
1730
type Provider struct {
1831
ClientKey string

0 commit comments

Comments
 (0)