Giter Site home page Giter Site logo

authboss-clientstate's Introduction

Authboss Client State

Session and Cookie ClientStateRW implementations using Gorilla.

Assuming you're using Gorilla in your web application you can easily use this package to augment Gorilla to be used with authboss or use this package's wrappers directly.

authboss-clientstate's People

Contributors

aarondl avatar ibraheemdev avatar ridewindx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

authboss-clientstate's Issues

Using GAE datastore as database undefined: http.SameSite

Starting the datastore emulator with:
$ dev_appserver.py app.yaml
throws an error that http.SameSite can't be found.

ERROR 2019-09-19 21:54:19,563 instance_factory.py:243] Failed to build Go application: (Executed command: /Users/x/google-cloud-sdk/platform/google_appengine/goroot-1.9/bin/go-app-builder -app_base /Users/x/Dropbox/go/src/authboss-sampleGAE -api_version go1 -arch 6 -dynamic -goroot /Users/x/google-cloud-sdk/platform/google_appengine/goroot-1.9 -nobuild_files ^^$ -incremental_rebuild -unsafe -binary_name _go_app -extra_imports appengine_internal/init -work_dir /var/folders/mw/0y88j8_54bjc93d_lg3120qw0000gp/T/tmpMREYx9appengine-go-bin -gcflags -I,/Users/x/google-cloud-sdk/platform/google_appengine/goroot-1.9/pkg/darwin_amd64_appengine -ldflags -L,/Users/Bryan/google-cloud-sdk/platform/google_appengine/goroot-1.9/pkg/darwin_amd64_appengine storer.go debug.go blog.go blogs.go middleware.go)

/Users/x/go/src/github.com/volatiletech/authboss-clientstate/cookies.go:37:11: undefined: http.SameSite

"net/http" is clearly imported on line 4 of cookies.go

Why is http.SameSite undefined?

WriteState type conversion can panic

https://github.com/volatiletech/authboss-clientstate/blob/master/sessions.go#L72

You should basically never do a type conversion without the , ok pattern. This method even already returns an error, so it would be trivial to just return an error that the type is unexpected.

I hit this in trying to get around volatiletech/authboss#181 by just allowing the state to be set to nil... but then it panics here. Clearly the state shouldn't be nil... but there's also no reason not to do the checked type conversion.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.