Skip to content

Commit 39b700c

Browse files
Merge pull request #249 from supertokens/example-app-update
chore: Add dashboard init to example apps
2 parents 8dcbec4 + 8b85774 commit 39b700c

File tree

10 files changed

+19
-0
lines changed

10 files changed

+19
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [unreleased]
99
- Adds unit test for Apple callback form post
10+
- Updates all example apps to also initialise dashboard recipe
1011

1112
## [0.10.2] - 2023-02-24
1213
- Adds APIs and logic to the dashboard recipe to enable email password based login

examples/with-chi-oso/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/go-chi/cors"
99
"github.com/supertokens/supertokens-golang/examples/with-chi-oso/database"
1010
"github.com/supertokens/supertokens-golang/examples/with-chi-oso/service"
11+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
1112
"github.com/supertokens/supertokens-golang/recipe/emailverification"
1213
"github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels"
1314
"github.com/supertokens/supertokens-golang/recipe/session"
@@ -60,6 +61,7 @@ func main() {
6061
},
6162
}),
6263
session.Init(nil),
64+
dashboard.Init(nil),
6365
},
6466
})
6567
if err != nil {

examples/with-chi/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66

77
"github.com/go-chi/chi/v5"
88
"github.com/go-chi/cors"
9+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
910
"github.com/supertokens/supertokens-golang/recipe/emailverification"
1011
"github.com/supertokens/supertokens-golang/recipe/emailverification/evmodels"
1112
"github.com/supertokens/supertokens-golang/recipe/session"
@@ -100,6 +101,7 @@ func main() {
100101
},
101102
}),
102103
session.Init(nil),
104+
dashboard.Init(nil),
103105
},
104106
})
105107

examples/with-fiber/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
45
"log"
56
"net/http"
67

@@ -93,6 +94,7 @@ func main() {
9394
},
9495
}),
9596
session.Init(nil),
97+
dashboard.Init(nil),
9698
},
9799
})
98100
if err != nil {

examples/with-gin/config/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package config
22

33
import (
4+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
45
"log"
56

67
"github.com/spf13/viper"
@@ -105,6 +106,7 @@ func Init() {
105106
},
106107
}),
107108
session.Init(nil),
109+
dashboard.Init(nil),
108110
// thirdparty.Init(thirdpartyConfig),
109111
},
110112
})

examples/with-go-zero/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"encoding/json"
5+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
56
"log"
67
"net/http"
78
"strings"
@@ -92,6 +93,7 @@ func main() {
9293
},
9394
}),
9495
session.Init(nil),
96+
dashboard.Init(nil),
9597
},
9698
})
9799
if err != nil {

examples/with-http/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"encoding/json"
5+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
56
"net/http"
67
"strings"
78

@@ -91,6 +92,7 @@ func main() {
9192
},
9293
}),
9394
session.Init(nil),
95+
dashboard.Init(nil),
9496
},
9597
})
9698

examples/with-labstack-echo/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"encoding/json"
55
"errors"
6+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
67
"net/http"
78
"strings"
89

@@ -94,6 +95,7 @@ func main() {
9495
},
9596
}),
9697
session.Init(nil),
98+
dashboard.Init(nil),
9799
},
98100
})
99101

examples/with-mux/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"encoding/json"
5+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
56
"net/http"
67

78
"github.com/gorilla/handlers"
@@ -92,6 +93,7 @@ func main() {
9293
},
9394
}),
9495
session.Init(nil),
96+
dashboard.Init(nil),
9597
},
9698
})
9799

examples/with-twirp/cmd/server/main.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
package main
1515

1616
import (
17+
"github.com/supertokens/supertokens-golang/recipe/dashboard"
1718
"log"
1819
"net/http"
1920
"os"
@@ -111,6 +112,7 @@ func main() {
111112
},
112113
}),
113114
session.Init(nil),
115+
dashboard.Init(nil),
114116
},
115117
})
116118

0 commit comments

Comments
 (0)