func (c *Client) CreateSignupToken(user services.User) (string, error) {
	if err := user.Check(); err != nil {
		return "", trace.Wrap(err)
	}
	out, err := c.PostJSON(c.Endpoint("signuptokens"), createSignupTokenReq{
		User: user,
	})
	if err != nil {
		return "", trace.Wrap(err)
	}
	var token string
	if err := json.Unmarshal(out.Bytes(), &token); err != nil {
		return "", trace.Wrap(err)
	}
	return token, nil
}
// CreateSignupToken creates one time token for creating account for the user
// For each token it creates username and hotp generator
CreateSignupToken creates one time token for creating account for the user
For each token it creates username and hotp generator
// CreateSignupToken creates one time token for creating account for the user // For each token it creates username and hotp generator
func (c *Client) CreateSignupToken(user services.User) (string, error) {
	if err := user.Check(); err != nil {
		return "", trace.Wrap(err)
	}
	out, err := c.PostJSON(c.Endpoint("signuptokens"), createSignupTokenReq{
		User: user,
	})
	if err != nil {
		return "", trace.Wrap(err)
	}
	var token string
	if err := json.Unmarshal(out.Bytes(), &token); err != nil {
		return "", trace.Wrap(err)
	}
	return token, nil
}
func ( c * Client ) CreateSignupToken ( user services . User ) ( string , error ) { if err := user . Check ( ) ; err != nil { return " " , trace . Wrap ( err ) } out , err := c . PostJSON ( c . Endpoint ( " " ) , createSignupTokenReq { User : user , } ) if err != nil { return " " , trace . Wrap ( err ) } var token string if err := json . Unmarshal ( out . Bytes ( ) , & token ) ; err != nil { return " " , trace . Wrap ( err ) } return token , nil }
CreateSignupToken creates one time token for creating account for the user
For each token it creates username and hotp generator
CreateSignupToken creates one time token for creating account for the user For each token it creates username and hotp generator