Skip to content

Commit

Permalink
(HOTFIX) Auth error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
theriverman committed Sep 27, 2020
1 parent c56b315 commit cadae68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ func (c *Client) Initialise() error {

// AuthByCredentials authenticates to Taiga using the provided basic credentials
func (c *Client) AuthByCredentials(credentials *Credentials) error {
if !c.isInitialised {
return c.Initialise()
if err := c.Initialise(); err != nil {
return err
}

if len(credentials.Type) <= 1 {
Expand All @@ -170,8 +170,8 @@ func (c *Client) AuthByCredentials(credentials *Credentials) error {

// AuthByToken authenticates to Taiga using provided Token by requesting users/me
func (c *Client) AuthByToken(tokenType, token string) error {
if !c.isInitialised {
return c.Initialise()
if err := c.Initialise(); err != nil {
return err
}
c.TokenType = tokenType
c.Token = token
Expand Down

0 comments on commit cadae68

Please sign in to comment.