GX7002: gx.Secret cannot cross to the client
A gx.Secret value is used where the browser can read it: in a signal or in a client expression.
Cause
A gx.Secret value is used where the browser can read it: in a signal or in a client expression.
Example
package cart
import "github.com/alternayte/gx"
signals {
Token gx.Secret = "key"
}
<p>Cart</p>gx check reports:
cart/Cart.gx:6:3: GX7002: signal "Token" has type gx.Secret; a secret cannot cross to the clientFix
- Keep the secret on the server.
- Pass to the browser only the result that the page needs.