Hello! New to Ory, loving the product so far. We’r...
# ory-network
s
Hello! New to Ory, loving the product so far. We’re using Ory Network to authenticate users on our Golang backend, the interface to which is CLI based. Right now the middleware is validating a session token passed in the authorization header using:
Copy code
func (m *oryMiddleware) oryValidateToken(token string) (*ory.Session, error) {
	session, _, err := m.oryClient.FrontendAPI.ToSession(context.Background()).
		XSessionToken(token).
		Execute()
	if err != nil {
		return nil, err
	}
my question is, where do I get a session token from for a new user? The ideal flow is that we check for a sessionToken in the CLI and if it doesn’t exist, output a link where they can login on the webui, which should return a sessionToken to the CLI (which can then be passed to the backend). I’m not able to find a way to get a sessionToken from the docs however