Skip to content

Commit b82d3a1

Browse files
committed
fix UTF-8 issues
1 parent 944cacf commit b82d3a1

File tree

4 files changed

+61
-4
lines changed

4 files changed

+61
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# oidc-demo <img src="https://travis-ci.org/Brickchain/oidc-demo.svg?branch=master">
1+
# oidc-demo <a href="https://travis-ci.org/Brickchain/oidc-demo"><img src="https://travis-ci.org/Brickchain/oidc-demo.svg?branch=master"></a>
22
Simple demo of our OAuth2/OpenID Connect provider<br>
33
Try the demo: <a href="https://oidc-demo-fd28c.firebaseapp.com">https://oidc-demo-fd28c.firebaseapp.com</a>
44
<br>

frontend/package-lock.json

+54
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@
2525
"core-js": "^2.5.1",
2626
"hammer-timejs": "^1.1.0",
2727
"hammerjs": "^2.0.8",
28+
"handlebars": "^4.0.11",
29+
"hi-base64": "^0.2.1",
2830
"integrity-webview-client": "^0.1.0",
2931
"moment-timezone": "^0.5.14",
3032
"mydaterangepicker": "^4.1.9",
3133
"rxjs": "^5.4.2",
32-
"zone.js": "^0.8.17",
33-
"handlebars": "^4.0.11"
34+
"zone.js": "^0.8.17"
3435
},
3536
"devDependencies": {
3637
"@angular/cli": "^1.4.4",

frontend/src/app/show/show.component.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'rxjs/add/operator/map';
44
import 'rxjs/add/operator/toPromise';
55
import { URLSearchParams } from '@angular/http';
66
import { Config } from '../config';
7+
import * as base64 from 'hi-base64';
78

89
@Component({
910
selector: 'app-page-show',
@@ -32,7 +33,8 @@ export class ShowComponent implements OnInit {
3233
this.loggedIn = true;
3334
Promise.resolve()
3435
.then(() => {
35-
let s = atob(this.data.split('.')[1])
36+
// let s = atob(this.data.split('.')[1])
37+
let s = base64.decode(this.data.split('.')[1])
3638
this.msg = JSON.parse(s)
3739

3840
if (this.msg.name != undefined) {

0 commit comments

Comments
 (0)