https://github.com/matthewhartstonge/storage
A Mongo Storage backend for https://github.com/ory/fosite
https://github.com/matthewhartstonge/storage
fosite fosite-storage-mongo go golang mongo oauth2 storage storage-backend
Last synced: 4 months ago
JSON representation
A Mongo Storage backend for https://github.com/ory/fosite
- Host: GitHub
- URL: https://github.com/matthewhartstonge/storage
- Owner: matthewhartstonge
- License: apache-2.0
- Created: 2017-05-22T04:54:32.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2026-01-13T01:08:35.000Z (5 months ago)
- Last Synced: 2026-01-16T13:37:30.143Z (5 months ago)
- Topics: fosite, fosite-storage-mongo, go, golang, mongo, oauth2, storage, storage-backend
- Language: Go
- Homepage:
- Size: 977 KB
- Stars: 20
- Watchers: 3
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Notice: NOTICE
Awesome Lists containing this project
- awesome-ory - MongoDB storage for Ory Fosite
README
# fosite-storage-mongo
[](https://github.com/matthewhartstonge/storage/actions/workflows/go.yaml) [](https://app.fossa.io/projects/git%2Bgithub.com%2Fmatthewhartstonge%2Fstorage?ref=badge_shield) [](https://goreportcard.com/report/github.com/matthewhartstonge/storage)
fosite-storage-mongo provides a native Go based [Mongo backed database storage][mongo-driver]
that conforms to *all the interfaces!* required by [ory/fosite][fosite].
Interface implementations are inspired from the SQL implementations found in [ory/hydra][hydra].
**Table of contents**
- [Compatibility](#compatibility)
- [Development](#development)
- [Testing](#testing)
- [Examples](#examples)
## Compatibility
The following table lists the compatible versions of fosite-storage-mongo with
fosite. If you are currently using this in production, it would be awesome to
know what versions you are successfully paired with.
| storage version | minimum fosite version | maximum fosite version |
|----------------:|-----------------------:|-----------------------:|
| `v0.36.X` | `v0.49.X` | `v0.49.X` |
| `v0.35.X` | `v0.34.X` | `v0.34.X` |
| `v0.34.X` | `v0.33.X` | `v0.34.X` |
## Development
To start hacking:
* Install [Go][Go] >=1.24
* Use Go modules!
* `go build` successfully!
### Testing
Use `go test ./...` to discover heinous crimes against coding!
## Examples
For a quick start check out the following examples based on the `fosite-example`
repo for reference:
- [MongoDB Example](./examples/mongo)
## Licensing
storage is under the Apache 2.0 License.
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fmatthewhartstonge%2Fstorage?ref=badge_large)
[//]: #
[fosite]:
[go]:
[hydra]:
[mongo-driver]: